diff --git a/generated/Aks/Aks.Autorest/Az.Aks.format.ps1xml b/generated/Aks/Aks.Autorest/Az.Aks.format.ps1xml index f6fcff3719d9..dd068b7cf518 100644 --- a/generated/Aks/Aks.Autorest/Az.Aks.format.ps1xml +++ b/generated/Aks/Aks.Autorest/Az.Aks.format.ps1xml @@ -1,6 +1,34 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AbsoluteMonthlySchedule + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AbsoluteMonthlySchedule#Multiple + + + + + + + + + + + + + + + DayOfMonth + + + IntervalMonth + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AccessProfile @@ -23,6 +51,78 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworking + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworking#Multiple + + + + + + + + + + + + Enabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingObservability + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingObservability#Multiple + + + + + + + + + + + + Enabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingSecurity + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingSecurity#Multiple + + + + + + + + + + + + + + + AdvancedNetworkPolicy + + + Enabled + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPool @@ -113,6 +213,28 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolGatewayProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolGatewayProfile#Multiple + + + + + + + + + + + + PublicIPPrefixSize + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolListResult @@ -157,6 +279,40 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolSecurityProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolSecurityProfile#Multiple + + + + + + + + + + + + + + + + + + EnableSecureBoot + + + EnableVtpm + + + SshAccess + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolUpgradeProfile @@ -254,16 +410,62 @@ + + + + + + + + + + + + + + DrainTimeoutInMinute + MaxSurge + + MaxUnavailable + + + NodeSoakDurationInMinute + + + UndrainableNodeBehavior + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolWindowsProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolWindowsProfile#Multiple + + + + + + + + + + + + DisableOutboundNat + @@ -288,6 +490,12 @@ + + + + + + @@ -303,6 +511,9 @@ + + + @@ -319,6 +530,12 @@ Location + + MachineName + + + Mode + PrivateEndpointConnectionName @@ -334,6 +551,9 @@ SubscriptionId + + TrustedAccessRoleBindingName + @@ -379,40 +599,6 @@ - - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudErrorBody - - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudErrorBody#Multiple - - - - - - - - - - - - - - - - - - Code - - - Message - - - Target - - - - - - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CommandResultProperties @@ -465,6 +651,28 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CompatibleVersions + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CompatibleVersions#Multiple + + + + + + + + + + + + Name + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceLinuxProfile @@ -497,9 +705,6 @@ - - - @@ -534,9 +739,6 @@ DnsServiceIP - - DockerBridgeCidr - LoadBalancerSku @@ -642,21 +844,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.EndpointDependency + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DailySchedule - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.EndpointDependency#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DailySchedule#Multiple - + - DomainName + IntervalDay @@ -664,36 +866,126 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.EndpointDetail + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DateSpan - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.EndpointDetail#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DateSpan#Multiple - - - - - - - + - + - Description + End - IPAddress + Start - - Port + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DelegatedResource + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DelegatedResource#Multiple + + + + + + + + + + + + + + + + + + + + + Location + + + ReferralResource + + + ResourceId + + + TenantId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.EndpointDependency + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.EndpointDependency#Multiple + + + + + + + + + + + + DomainName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.EndpointDetail + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.EndpointDetail#Multiple + + + + + + + + + + + + + + + + + + + + + Description + + + IPAddress + + + Port Protocol @@ -703,6 +995,40 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetail + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetail#Multiple + + + + + + + + + + + + + + + + + + Code + + + Message + + + Target + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ExtendedLocation @@ -725,6 +1051,146 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.GpuProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.GpuProfile#Multiple + + + + + + + + + + + + Driver + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPTag + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPTag#Multiple + + + + + + + + + + + + Tag + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioEgressGateway + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioEgressGateway#Multiple + + + + + + + + + + + + Enabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioIngressGateway + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioIngressGateway#Multiple + + + + + + + + + + + + + + + Enabled + + + Mode + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthority + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthority#Multiple + + + + + + + + + + + + + + + + + + + + + + + + CertChainObjectName + + + CertObjectName + + + KeyObjectName + + + KeyVaultId + + + RootCertObjectName + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubeletConfig @@ -801,6 +1267,40 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersion + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersion#Multiple + + + + + + + + + + + + + + + + + + IsDefault + + + IsPreview + + + Version + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.LinuxOSConfig @@ -835,6 +1335,106 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Machine + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Machine#Multiple + + + + + + + + + + + + + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineIPAddress + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineIPAddress#Multiple + + + + + + + + + + + + + + + Family + + + IP + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineListResult + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineProperties + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineProperties#Multiple + + + + + + + + + + + + ResourceId + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfiguration @@ -878,7 +1478,47 @@ - NextLink + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceWindow + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceWindow#Multiple + + + + + + + + + + + + + + + + + + + + + DurationHour + + + StartDate + + + StartTime + + + UtcOffset @@ -916,6 +1556,12 @@ + + + + + + @@ -947,6 +1593,12 @@ SystemDataLastModifiedByType + + ETag + + + Kind + ResourceGroupName @@ -1162,6 +1814,9 @@ + + + @@ -1171,6 +1826,9 @@ + + + @@ -1186,9 +1844,15 @@ + + + + + + @@ -1240,6 +1904,9 @@ + + + @@ -1267,12 +1934,24 @@ + + + + + + + + + + + + @@ -1288,18 +1967,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -1310,6 +2013,9 @@ + + CapacityReservationGroupId + Count @@ -1319,6 +2025,9 @@ CurrentOrchestratorVersion + + ETag + EnableAutoScaling @@ -1334,9 +2043,15 @@ EnableUltraSsd + + GatewayProfilePublicIPPrefixSize + GpuInstanceProfile + + GpuProfileDriver + HostGroupId @@ -1388,6 +2103,9 @@ MaxPod + + MessageOfTheDay + MinCount @@ -1415,12 +2133,24 @@ OrchestratorVersion + + PodIPAllocationMode + PodSubnetId PowerStateCode + + ProvisioningErrorCode + + + ProvisioningErrorMessage + + + ProvisioningErrorTarget + ProvisioningState @@ -1436,18 +2166,42 @@ ScaleSetPriority + + SecurityProfileEnableSecureBoot + + + SecurityProfileEnableVtpm + + + SecurityProfileSshAccess + SpotMaxPrice + + UpgradeSettingDrainTimeoutInMinute + UpgradeSettingMaxSurge + + UpgradeSettingMaxUnavailable + + + UpgradeSettingNodeSoakDurationInMinute + + + UpgradeSettingUndrainableNodeBehavior + VMSize VnetSubnetId + + WindowProfileDisableOutboundNat + WorkloadRuntime @@ -1466,12 +2220,18 @@ + + + + + + @@ -1502,6 +2262,9 @@ + + + @@ -1529,6 +2292,9 @@ + + + @@ -1563,12 +2329,18 @@ + + CapacityReservationGroupId + Count CurrentOrchestratorVersion + + ETag + EnableAutoScaling @@ -1599,6 +2371,9 @@ MaxPod + + MessageOfTheDay + MinCount @@ -1626,6 +2401,9 @@ OrchestratorVersion + + PodIPAllocationMode + PodSubnetId @@ -1705,6 +2483,28 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAiToolchainOperatorProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAiToolchainOperatorProfile#Multiple + + + + + + + + + + + + Enabled + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterApiServerAccessProfile @@ -1721,9 +2521,15 @@ + + + + + + @@ -1737,9 +2543,15 @@ EnablePrivateClusterPublicFqdn + + EnableVnetIntegration + PrivateDnsZone + + SubnetId + @@ -1752,6 +2564,9 @@ + + + @@ -1759,6 +2574,9 @@ + + NodeOSUpgradeChannel + UpgradeChannel @@ -1817,6 +2635,56 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterBootstrapProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterBootstrapProfile#Multiple + + + + + + + + + + + + + + + ArtifactSource + + + ContainerRegistryId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterCostAnalysis + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterCostAnalysis#Multiple + + + + + + + + + + + + Enabled + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterHttpProxyConfig @@ -1879,6 +2747,50 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileNginx + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileNginx#Multiple + + + + + + + + + + + + DefaultIngressControllerType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileWebAppRouting + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileWebAppRouting#Multiple + + + + + + + + + + + + Enabled + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterListResult @@ -1911,6 +2823,9 @@ + + + @@ -1924,6 +2839,9 @@ AllocatedOutboundPort + + BackendPoolType + EnableMultipleStandardLoadBalancer @@ -1978,7 +2896,57 @@ - Count + Count + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNatGatewayProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNatGatewayProfile#Multiple + + + + + + + + + + + + IdleTimeoutInMinute + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeProvisioningProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeProvisioningProfile#Multiple + + + + + + + + + + + + + + + DefaultNodePool + + + Mode @@ -1986,21 +2954,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNatGatewayProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeResourceGroupProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNatGatewayProfile#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeResourceGroupProfile#Multiple - + - IdleTimeoutInMinute + RestrictionLevel @@ -2271,9 +3239,6 @@ - - - @@ -2301,6 +3266,12 @@ + + + + + + @@ -2320,9 +3291,6 @@ DnsPrefix - - EnablePodSecurityPolicy - EnableRbac @@ -2350,6 +3318,12 @@ PublicNetworkAccess + + ResourceUid + + + SupportPlan + @@ -2365,9 +3339,18 @@ + + + + + + + + + @@ -2420,9 +3403,18 @@ BalanceSimilarNodeGroup + + DaemonsetEvictionForEmptyNode + + + DaemonsetEvictionForOccupiedNode + Expander + + IgnoreDaemonsetsUtilization + MaxEmptyBulkDelete @@ -2645,6 +3637,28 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStaticEgressGatewayProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStaticEgressGatewayProfile#Multiple + + + + + + + + + + + + Enabled + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileBlobCsiDriver @@ -2675,14 +3689,226 @@ - + + + + + + + + Enabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileFileCsiDriver + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileFileCsiDriver#Multiple + + + + + + + + + + + + Enabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileSnapshotController + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileSnapshotController#Multiple + + + + + + + + + + + + Enabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterUpgradeProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterUpgradeProfile#Multiple + + + + + + + + + + + + + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWindowsProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWindowsProfile#Multiple + + + + + + + + + + + + + + + + + + + + + AdminPassword + + + AdminUsername + + + EnableCsiProxy + + + LicenseType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileKeda + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileKeda#Multiple + + + + + + + + + + + + Enabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler#Multiple + + + + + + + + + + + + Enabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedServiceIdentityUserAssignedIdentitiesValue + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedServiceIdentityUserAssignedIdentitiesValue#Multiple + + + + + + + + + + + + + + + ClientId + + + PrincipalId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManualScaleProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManualScaleProfile#Multiple + + + + + + + + - Enabled + Count + + + Size @@ -2690,21 +3916,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileFileCsiDriver + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevision - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileFileCsiDriver#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevision#Multiple - + - Enabled + Revision @@ -2712,21 +3938,63 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileSnapshotController + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileSnapshotController#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfile#Multiple - + + + + + + + + + + + + + + + + + + + + + + - Enabled + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName @@ -2734,27 +4002,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterUpgradeProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfileList - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterUpgradeProfile#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfileList#Multiple - - - - + - Name - - - ResourceGroupName + NextLink @@ -2762,39 +4024,63 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWindowsProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWindowsProfile#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfile#Multiple - + - + - + - + + + + + + + + + + + + + - AdminPassword + Name - AdminUsername + SystemDataCreatedAt - EnableCsiProxy + SystemDataCreatedBy - LicenseType + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName @@ -2802,21 +4088,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileKeda + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfileList - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileKeda#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfileList#Multiple - + - Enabled + NextLink @@ -2824,27 +4110,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedServiceIdentityUserAssignedIdentitiesValue + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfileProperties - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedServiceIdentityUserAssignedIdentitiesValue#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfileProperties#Multiple - - - - + - ClientId - - - PrincipalId + Revision @@ -3022,27 +4302,43 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OutboundEnvironmentEndpoint - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionProfile#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OutboundEnvironmentEndpoint#Multiple - - - - + - Name + Category + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OutboundEnvironmentEndpointCollection + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OutboundEnvironmentEndpointCollection#Multiple + + + + + + + + + + - ResourceGroupName + NextLink @@ -3050,27 +4346,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionProperty + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PortRange - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionProperty#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PortRange#Multiple - + - + + + + - EnableFipsImage + PortEnd - OSType + PortStart + + + Protocol @@ -3078,21 +4380,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OutboundEnvironmentEndpoint + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PowerState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OutboundEnvironmentEndpoint#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PowerState#Multiple - + - Category + Code @@ -3100,21 +4402,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OutboundEnvironmentEndpointCollection + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnection - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OutboundEnvironmentEndpointCollection#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnection#Multiple - + + + + - NextLink + Name + + + ResourceGroupName @@ -3122,21 +4430,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PowerState + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnectionProperties - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PowerState#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnectionProperties#Multiple - + - Code + ProvisioningState @@ -3144,15 +4452,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnection + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkResource - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnection#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkResource#Multiple + + + + + + @@ -3160,9 +4474,15 @@ + + GroupId + Name + + PrivateLinkServiceId + ResourceGroupName @@ -3172,21 +4492,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnectionProperties + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkServiceConnectionState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnectionProperties#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkServiceConnectionState#Multiple - + + + + - ProvisioningState + Description + + + Status @@ -3194,39 +4520,57 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkResource + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ProxyResource - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkResource#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ProxyResource#Multiple - + - + - + - + + + + + + + + + + - GroupId + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType - Name + SystemDataLastModifiedAt - PrivateLinkServiceId + SystemDataLastModifiedBy - ResourceGroupName + SystemDataLastModifiedByType @@ -3234,27 +4578,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkServiceConnectionState + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RelativeMonthlySchedule - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkServiceConnectionState#Multiple + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RelativeMonthlySchedule#Multiple - + - + + + + - Description + DayOfWeek - Status + IntervalMonth + + + WeekIndex @@ -3339,6 +4689,28 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ServiceMeshProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ServiceMeshProfile#Multiple + + + + + + + + + + + + Mode + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot @@ -3905,6 +5277,198 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRole + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRole#Multiple + + + + + + + + + + + + + + + Name + + + SourceResourceType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBinding + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBinding#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBindingListResult + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBindingListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBindingProperties + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBindingProperties#Multiple + + + + + + + + + + + + + + + ProvisioningState + + + SourceResourceId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleListResult + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UpgradeOverrideSettings + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UpgradeOverrideSettings#Multiple + + + + + + + + + + + + + + + ForceUpgrade + + + Until + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UserAssignedIdentity @@ -3939,6 +5503,62 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachineNodes + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachineNodes#Multiple + + + + + + + + + + + + + + + Count + + + Size + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.WeeklySchedule + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.WeeklySchedule#Multiple + + + + + + + + + + + + + + + DayOfWeek + + + IntervalWeek + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.WindowsGmsaProfile diff --git a/generated/Aks/Aks.Autorest/Az.Aks.psd1 b/generated/Aks/Aks.Autorest/Az.Aks.psd1 index 8eb8b95df59e..08def562a6d4 100644 --- a/generated/Aks/Aks.Autorest/Az.Aks.psd1 +++ b/generated/Aks/Aks.Autorest/Az.Aks.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.Aks.private.dll' FormatsToProcess = './Az.Aks.format.ps1xml' - FunctionsToExport = 'Get-AzAksMaintenanceConfiguration', 'Get-AzAksManagedClusterCommandResult', 'Get-AzAksManagedClusterOSOption', 'Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint', 'Get-AzAksNodePoolUpgradeProfile', 'Get-AzAksSnapshot', 'Get-AzAksUpgradeProfile', 'Get-AzAksVersion', 'Install-AzAksCliTool', 'Invoke-AzAksAbortAgentPoolLatestOperation', 'Invoke-AzAksAbortManagedClusterLatestOperation', 'Invoke-AzAksRotateManagedClusterServiceAccountSigningKey', 'New-AzAksMaintenanceConfiguration', 'New-AzAksSnapshot', 'New-AzAksTimeInWeekObject', 'New-AzAksTimeSpanObject', 'Remove-AzAksMaintenanceConfiguration', 'Remove-AzAksSnapshot', 'Start-AzAksCluster', 'Start-AzAksManagedClusterCommand', 'Stop-AzAksCluster', 'Update-AzAksMaintenanceConfiguration' + FunctionsToExport = 'Get-AzAksMachine', 'Get-AzAksMaintenanceConfiguration', 'Get-AzAksManagedClusterCommandResult', 'Get-AzAksManagedClusterKuberneteVersion', 'Get-AzAksManagedClusterMeshRevisionProfile', 'Get-AzAksManagedClusterMeshUpgradeProfile', 'Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint', 'Get-AzAksNodePoolUpgradeProfile', 'Get-AzAksSnapshot', 'Get-AzAksTrustedAccessRole', 'Get-AzAksTrustedAccessRoleBinding', 'Get-AzAksUpgradeProfile', 'Get-AzAksVersion', 'Install-AzAksCliTool', 'Invoke-AzAksAbortAgentPoolLatestOperation', 'Invoke-AzAksAbortManagedClusterLatestOperation', 'Invoke-AzAksRotateManagedClusterServiceAccountSigningKey', 'New-AzAksMaintenanceConfiguration', 'New-AzAksSnapshot', 'New-AzAksTimeInWeekObject', 'New-AzAksTimeSpanObject', 'New-AzAksTrustedAccessRoleBinding', 'Remove-AzAksAgentPoolMachine', 'Remove-AzAksMaintenanceConfiguration', 'Remove-AzAksSnapshot', 'Remove-AzAksTrustedAccessRoleBinding', 'Start-AzAksCluster', 'Start-AzAksManagedClusterCommand', 'Stop-AzAksCluster', 'Update-AzAksMaintenanceConfiguration', 'Update-AzAksTrustedAccessRoleBinding' AliasesToExport = 'Get-AzAksClusterUpgradeProfile' PrivateData = @{ PSData = @{ diff --git a/generated/Aks/Aks.Autorest/Properties/AssemblyInfo.cs b/generated/Aks/Aks.Autorest/Properties/AssemblyInfo.cs index 202a28fd9244..771d12e2fbb0 100644 --- a/generated/Aks/Aks.Autorest/Properties/AssemblyInfo.cs +++ b/generated/Aks/Aks.Autorest/Properties/AssemblyInfo.cs @@ -20,7 +20,7 @@ [assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] [assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] [assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Aks")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("6.1.1")] -[assembly: System.Reflection.AssemblyVersionAttribute("6.1.1")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("7.0.0")] +[assembly: System.Reflection.AssemblyVersionAttribute("7.0.0")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] diff --git a/generated/Aks/Aks.Autorest/exports/Get-AzAksMachine.ps1 b/generated/Aks/Aks.Autorest/exports/Get-AzAksMachine.ps1 new file mode 100644 index 000000000000..1d9e2254f342 --- /dev/null +++ b/generated/Aks/Aks.Autorest/exports/Get-AzAksMachine.ps1 @@ -0,0 +1,292 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a specific machine in the specified agent pool. +.Description +Get a specific machine in the specified agent pool. +.Example +Get-AzAksMachine -AgentPoolName 'default' -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +AGENTPOOLINPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +MANAGEDCLUSTERINPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. +.Link +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmachine +#> +function Get-AzAksMachine { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the agent pool. + ${AgentPoolName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityAgentPool', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory)] + [Alias('MachineName')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # host name of the machine + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityAgentPool', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${AgentPoolInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${ManagedClusterInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Aks.private\Get-AzAksMachine_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksMachine_GetViaIdentity'; + GetViaIdentityAgentPool = 'Az.Aks.private\Get-AzAksMachine_GetViaIdentityAgentPool'; + GetViaIdentityManagedCluster = 'Az.Aks.private\Get-AzAksMachine_GetViaIdentityManagedCluster'; + List = 'Az.Aks.private\Get-AzAksMachine_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/generated/Aks/Aks.Autorest/exports/Get-AzAksMaintenanceConfiguration.ps1 b/generated/Aks/Aks.Autorest/exports/Get-AzAksMaintenanceConfiguration.ps1 index c07de3ec573f..fbe264f9e5bb 100644 --- a/generated/Aks/Aks.Autorest/exports/Get-AzAksMaintenanceConfiguration.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Get-AzAksMaintenanceConfiguration.ps1 @@ -43,24 +43,30 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. MANAGEDCLUSTERINPUTOBJECT : Identity Parameter [AgentPoolName ]: The name of the agent pool. [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link https://learn.microsoft.com/powershell/module/az.aks/get-azaksmaintenanceconfiguration #> @@ -96,6 +102,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterCommandResult.ps1 b/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterCommandResult.ps1 index fd10fd122b80..4473a0fd5263 100644 --- a/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterCommandResult.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterCommandResult.ps1 @@ -36,24 +36,30 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. MANAGEDCLUSTERINPUTOBJECT : Identity Parameter [AgentPoolName ]: The name of the agent pool. [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclustercommandresult #> @@ -86,6 +92,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOSOption.ps1 b/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterKuberneteVersion.ps1 similarity index 78% rename from generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOSOption.ps1 rename to generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterKuberneteVersion.ps1 index 88dc3c1e06b2..cd924fd5a039 100644 --- a/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOSOption.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterKuberneteVersion.ps1 @@ -16,64 +16,35 @@ <# .Synopsis -Gets supported OS options in the specified subscription. +Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version .Description -Gets supported OS options in the specified subscription. +Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version .Example -Get-AzAksManagedClusterOSOption -Location eastus +Get-AzAksManagedClusterKuberneteVersion -Location eastus -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile -.Notes -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - -INPUTOBJECT : Identity Parameter - [AgentPoolName ]: The name of the agent pool. - [CommandId ]: Id of the command. - [ConfigName ]: The name of the maintenance configuration. - [Id ]: Resource identity path - [Location ]: The name of Azure region. - [PrivateEndpointConnectionName ]: The name of the private endpoint connection. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ResourceName ]: The name of the managed cluster resource. - [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult .Link -https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclusterosoption +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclusterkuberneteversion #> -function Get-AzAksManagedClusterOSOption { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +function Get-AzAksManagedClusterKuberneteVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of Azure region. + # The name of the Azure region. ${Location}, - [Parameter(ParameterSetName='Get')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] - # Identity Parameter - ${InputObject}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Query')] - [System.String] - # The resource type for which the OS options needs to be returned - ${ResourceType}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -158,10 +129,9 @@ begin { } $mapping = @{ - Get = 'Az.Aks.private\Get-AzAksManagedClusterOSOption_Get'; - GetViaIdentity = 'Az.Aks.private\Get-AzAksManagedClusterOSOption_GetViaIdentity'; + List = 'Az.Aks.private\Get-AzAksManagedClusterKuberneteVersion_List'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { diff --git a/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterMeshRevisionProfile.ps1 b/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterMeshRevisionProfile.ps1 new file mode 100644 index 000000000000..b05a861c825b --- /dev/null +++ b/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterMeshRevisionProfile.ps1 @@ -0,0 +1,252 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades +.Description +Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades +.Example +Get-AzAksManagedClusterMeshRevisionProfile -Location eastus + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +LOCATIONINPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. +.Link +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclustermeshrevisionprofile +#> +function Get-AzAksManagedClusterMeshRevisionProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The mode of the mesh. + ${Mode}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Aks.private\Get-AzAksManagedClusterMeshRevisionProfile_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksManagedClusterMeshRevisionProfile_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Aks.private\Get-AzAksManagedClusterMeshRevisionProfile_GetViaIdentityLocation'; + List = 'Az.Aks.private\Get-AzAksManagedClusterMeshRevisionProfile_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterMeshUpgradeProfile.ps1 b/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterMeshUpgradeProfile.ps1 new file mode 100644 index 000000000000..d72097c51c72 --- /dev/null +++ b/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterMeshUpgradeProfile.ps1 @@ -0,0 +1,260 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets available upgrades for a service mesh in a cluster. +.Description +Gets available upgrades for a service mesh in a cluster. +.Example +Get-AzAksManagedClusterMeshUpgradeProfile -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +MANAGEDCLUSTERINPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. +.Link +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclustermeshupgradeprofile +#> +function Get-AzAksManagedClusterMeshUpgradeProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The mode of the mesh. + ${Mode}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${ManagedClusterInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Aks.private\Get-AzAksManagedClusterMeshUpgradeProfile_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksManagedClusterMeshUpgradeProfile_GetViaIdentity'; + GetViaIdentityManagedCluster = 'Az.Aks.private\Get-AzAksManagedClusterMeshUpgradeProfile_GetViaIdentityManagedCluster'; + List = 'Az.Aks.private\Get-AzAksManagedClusterMeshUpgradeProfile_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.ps1 b/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.ps1 index 92b95880f6bf..0e7dd126edf5 100644 --- a/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.ps1 @@ -52,6 +52,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter()] diff --git a/generated/Aks/Aks.Autorest/exports/Get-AzAksNodePoolUpgradeProfile.ps1 b/generated/Aks/Aks.Autorest/exports/Get-AzAksNodePoolUpgradeProfile.ps1 index 0bff81f4fe20..2fc5e143ed7a 100644 --- a/generated/Aks/Aks.Autorest/exports/Get-AzAksNodePoolUpgradeProfile.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Get-AzAksNodePoolUpgradeProfile.ps1 @@ -36,24 +36,30 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. MANAGEDCLUSTERINPUTOBJECT : Identity Parameter [AgentPoolName ]: The name of the agent pool. [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link https://learn.microsoft.com/powershell/module/az.aks/get-azaksnodepoolupgradeprofile #> @@ -87,6 +93,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/Aks/Aks.Autorest/exports/Get-AzAksSnapshot.ps1 b/generated/Aks/Aks.Autorest/exports/Get-AzAksSnapshot.ps1 index ee23bcbc50b7..eb4ee3cdf708 100644 --- a/generated/Aks/Aks.Autorest/exports/Get-AzAksSnapshot.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Get-AzAksSnapshot.ps1 @@ -44,12 +44,15 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link https://learn.microsoft.com/powershell/module/az.aks/get-azakssnapshot #> @@ -78,6 +81,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/Aks/Aks.Autorest/exports/Get-AzAksTrustedAccessRole.ps1 b/generated/Aks/Aks.Autorest/exports/Get-AzAksTrustedAccessRole.ps1 new file mode 100644 index 000000000000..4a73e0d55b62 --- /dev/null +++ b/generated/Aks/Aks.Autorest/exports/Get-AzAksTrustedAccessRole.ps1 @@ -0,0 +1,192 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List supported trusted access roles. +.Description +List supported trusted access roles. +.Example +Get-AzAksTrustedAccessRole -Location eastus + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole +.Link +https://learn.microsoft.com/powershell/module/az.aks/get-azakstrustedaccessrole +#> +function Get-AzAksTrustedAccessRole { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Aks.private\Get-AzAksTrustedAccessRole_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/generated/Aks/Aks.Autorest/exports/Get-AzAksTrustedAccessRoleBinding.ps1 b/generated/Aks/Aks.Autorest/exports/Get-AzAksTrustedAccessRoleBinding.ps1 new file mode 100644 index 000000000000..3ffabb44558f --- /dev/null +++ b/generated/Aks/Aks.Autorest/exports/Get-AzAksTrustedAccessRoleBinding.ps1 @@ -0,0 +1,263 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a trusted access role binding. +.Description +Get a trusted access role binding. +.Example +Get-AzAksTrustedAccessRoleBinding -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster +.Example +Get-AzAksTrustedAccessRoleBinding -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster -Name testBinding + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +MANAGEDCLUSTERINPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. +.Link +https://learn.microsoft.com/powershell/module/az.aks/get-azakstrustedaccessrolebinding +#> +function Get-AzAksTrustedAccessRoleBinding { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory)] + [Alias('TrustedAccessRoleBindingName')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of trusted access role binding. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${ManagedClusterInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Aks.private\Get-AzAksTrustedAccessRoleBinding_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksTrustedAccessRoleBinding_GetViaIdentity'; + GetViaIdentityManagedCluster = 'Az.Aks.private\Get-AzAksTrustedAccessRoleBinding_GetViaIdentityManagedCluster'; + List = 'Az.Aks.private\Get-AzAksTrustedAccessRoleBinding_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/generated/Aks/Aks.Autorest/exports/Get-AzAksUpgradeProfile.ps1 b/generated/Aks/Aks.Autorest/exports/Get-AzAksUpgradeProfile.ps1 index 9834188d9155..7fa0e3a0b682 100644 --- a/generated/Aks/Aks.Autorest/exports/Get-AzAksUpgradeProfile.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Get-AzAksUpgradeProfile.ps1 @@ -36,12 +36,15 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link https://learn.microsoft.com/powershell/module/az.aks/get-azaksupgradeprofile #> @@ -69,6 +72,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/Aks/Aks.Autorest/exports/Invoke-AzAksAbortAgentPoolLatestOperation.ps1 b/generated/Aks/Aks.Autorest/exports/Invoke-AzAksAbortAgentPoolLatestOperation.ps1 index 0d0a1818a948..f273138c11eb 100644 --- a/generated/Aks/Aks.Autorest/exports/Invoke-AzAksAbortAgentPoolLatestOperation.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Invoke-AzAksAbortAgentPoolLatestOperation.ps1 @@ -40,24 +40,30 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. MANAGEDCLUSTERINPUTOBJECT : Identity Parameter [AgentPoolName ]: The name of the agent pool. [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksabortagentpoollatestoperation #> @@ -90,6 +96,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='AbortViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/Aks/Aks.Autorest/exports/Invoke-AzAksAbortManagedClusterLatestOperation.ps1 b/generated/Aks/Aks.Autorest/exports/Invoke-AzAksAbortManagedClusterLatestOperation.ps1 index 559c2c0cea76..a76ca9975bbd 100644 --- a/generated/Aks/Aks.Autorest/exports/Invoke-AzAksAbortManagedClusterLatestOperation.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Invoke-AzAksAbortManagedClusterLatestOperation.ps1 @@ -40,12 +40,15 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksabortmanagedclusterlatestoperation #> @@ -71,6 +74,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='AbortViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/Aks/Aks.Autorest/exports/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.ps1 b/generated/Aks/Aks.Autorest/exports/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.ps1 index bc91eab66ca4..860dfc87b3c3 100644 --- a/generated/Aks/Aks.Autorest/exports/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.ps1 @@ -36,12 +36,15 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksrotatemanagedclusterserviceaccountsigningkey #> @@ -67,6 +70,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='RotateViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/Aks/Aks.Autorest/exports/New-AzAksMaintenanceConfiguration.ps1 b/generated/Aks/Aks.Autorest/exports/New-AzAksMaintenanceConfiguration.ps1 index e01e2644724b..a09ba81d13e2 100644 --- a/generated/Aks/Aks.Autorest/exports/New-AzAksMaintenanceConfiguration.ps1 +++ b/generated/Aks/Aks.Autorest/exports/New-AzAksMaintenanceConfiguration.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -create a maintenance configuration in the specified managed cluster. +Create a maintenance configuration in the specified managed cluster. .Description -create a maintenance configuration in the specified managed cluster. +Create a maintenance configuration in the specified managed cluster. .Example $TimeSpan = New-AzAksTimeSpanObject -Start (Get-Date -Year 2023 -Month 3 -Day 1) -End (Get-Date -Year 2023 -Month 3 -Day 2) $TimeInWeek = New-AzAksTimeInWeekObject -Day Sunday -HourSlot 1,2 @@ -31,13 +31,17 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +MAINTENANCEWINDOWNOTALLOWEDDATE : Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. + End : The end date of the date span. + Start : The start date of the date span. + NOTALLOWEDTIME : Time slots on which upgrade is not allowed. [End ]: The end of a time span [Start ]: The start of a time span -TIMEINWEEK : If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. +TIMEINWEEK : 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. [Day ]: The day of the week. - [HourSlot >]: Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + [HourSlot >]: A list of hours in the day used to identify a time range. Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. .Link https://learn.microsoft.com/powershell/module/az.aks/new-azaksmaintenanceconfiguration #> @@ -69,8 +73,67 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # The date of the month. + ${AbsoluteMonthlyDayOfMonth}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of months between each set of occurrences. + ${AbsoluteMonthlyIntervalMonth}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of days between each set of occurrences. + ${DailyIntervalDay}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Length of maintenance window range from 4 to 24 hours. + ${MaintenanceWindowDurationHour}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan[]] + # Date ranges on which upgrade is not allowed. + # 'utcOffset' applies to this field. + # For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. + ${MaintenanceWindowNotAllowedDate}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.DateTime] + # The date the maintenance window activates. + # If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. + # If not specified, the maintenance window will be active right away. + ${MaintenanceWindowStartDate}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The start time of the maintenance window. + # Accepted values are from '00:00' to '23:59'. + # 'utcOffset' applies to this field. + # For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + ${MaintenanceWindowStartTime}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The UTC offset in format +/-HH:mm. + # For example, '+05:30' for IST and '-07:00' for PST. + # If not specified, the default is '+00:00'. + ${MaintenanceWindowUtcOffset}, + [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] @@ -78,13 +141,48 @@ param( # Time slots on which upgrade is not allowed. ${NotAllowedTime}, + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Specifies on which day of the week the maintenance occurs. + ${RelativeMonthlyDayOfWeek}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of months between each set of occurrences. + ${RelativeMonthlyIntervalMonth}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The week index. + # Specifies on which week of the month the dayOfWeek applies. + ${RelativeMonthlyWeekIndex}, + [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek[]] + # 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. ${TimeInWeek}, + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Specifies on which day of the week the maintenance occurs. + ${WeeklyDayOfWeek}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of weeks between each set of occurrences. + ${WeeklyIntervalWeek}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] [System.String] diff --git a/generated/Aks/Aks.Autorest/exports/New-AzAksSnapshot.ps1 b/generated/Aks/Aks.Autorest/exports/New-AzAksSnapshot.ps1 index e1dbfd9b4973..4064e13a43e0 100644 --- a/generated/Aks/Aks.Autorest/exports/New-AzAksSnapshot.ps1 +++ b/generated/Aks/Aks.Autorest/exports/New-AzAksSnapshot.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -create a snapshot. +Create a snapshot. .Description -create a snapshot. +Create a snapshot. .Example $pool = Get-AzAksNodePool -ResourceGroupName mygroup -ClusterName mycluster -Name default New-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' -Location eastus -SnapshotType 'NodePool' -CreationDataSourceResourceId $pool.Id @@ -50,6 +50,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] diff --git a/generated/Aks/Aks.Autorest/exports/New-AzAksTimeInWeekObject.ps1 b/generated/Aks/Aks.Autorest/exports/New-AzAksTimeInWeekObject.ps1 index 808c59fcc0a2..2b9539c0fd2f 100644 --- a/generated/Aks/Aks.Autorest/exports/New-AzAksTimeInWeekObject.ps1 +++ b/generated/Aks/Aks.Autorest/exports/New-AzAksTimeInWeekObject.ps1 @@ -41,6 +41,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] [System.Int32[]] + # A list of hours in the day used to identify a time range. # Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). # 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. # Specifying [0, 1] means the 00:00 - 02:00 UTC time range. diff --git a/generated/Aks/Aks.Autorest/exports/New-AzAksTrustedAccessRoleBinding.ps1 b/generated/Aks/Aks.Autorest/exports/New-AzAksTrustedAccessRoleBinding.ps1 new file mode 100644 index 000000000000..b42a17a5a48a --- /dev/null +++ b/generated/Aks/Aks.Autorest/exports/New-AzAksTrustedAccessRoleBinding.ps1 @@ -0,0 +1,246 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a trusted access role binding +.Description +Create a trusted access role binding +.Example +New-AzAksTrustedAccessRoleBinding -Name testBinding -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster -Role 'Microsoft.MachineLearningServices/workspaces/mlworkload' -SourceResourceId "/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/AKS_TEST_RG/providers/Microsoft.MachineLearningServices/workspaces/TestAML001" + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding +.Link +https://learn.microsoft.com/powershell/module/az.aks/new-azakstrustedaccessrolebinding +#> +function New-AzAksTrustedAccessRoleBinding { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('TrustedAccessRoleBindingName')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of trusted access role binding. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String[]] + # A list of roles to bind, each item is a resource type qualified role name. + # For example: 'Microsoft.MachineLearningServices/workspaces/reader'. + ${Role}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The ARM resource ID of source resource that trusted access is configured for. + ${SourceResourceId}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Aks.private\New-AzAksTrustedAccessRoleBinding_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Aks.private\New-AzAksTrustedAccessRoleBinding_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Aks.private\New-AzAksTrustedAccessRoleBinding_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/generated/Aks/Aks.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/Aks/Aks.Autorest/exports/ProxyCmdletDefinitions.ps1 index fd7262299534..94f0e9e19c58 100644 --- a/generated/Aks/Aks.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/Aks/Aks.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -16,64 +16,88 @@ <# .Synopsis -Gets the specified maintenance configuration of a managed cluster. +Get a specific machine in the specified agent pool. .Description -Gets the specified maintenance configuration of a managed cluster. -.Example -Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster +Get a specific machine in the specified agent pool. .Example -Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' -.Example -$TimeSpan = New-AzAksTimeSpanObject -Start (Get-Date -Year 2023 -Month 3 -Day 1) -End (Get-Date -Year 2023 -Month 3 -Day 2) -$TimeInWeek = New-AzAksTimeInWeekObject -Day 'Sunday' -HourSlot 1,2 -$MaintenanceConfig = New-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' -TimeInWeek $TimeInWeek -NotAllowedTime $TimeSpan -$MaintenanceConfig | Get-AzAksMaintenanceConfiguration +Get-AzAksMachine -AgentPoolName 'default' -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +AGENTPOOLINPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + INPUTOBJECT : Identity Parameter [AgentPoolName ]: The name of the agent pool. [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. MANAGEDCLUSTERINPUTOBJECT : Identity Parameter [AgentPoolName ]: The name of the agent pool. [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link -https://learn.microsoft.com/powershell/module/az.aks/get-azaksmaintenanceconfiguration +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmachine #> -function Get-AzAksMaintenanceConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration])] +function Get-AzAksMachine { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of the maintenance configuration. - ${ConfigName}, + # The name of the agent pool. + ${AgentPoolName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityAgentPool', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory)] + [Alias('MachineName')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # host name of the machine + ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] @@ -96,6 +120,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -104,6 +129,12 @@ param( # Identity Parameter ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityAgentPool', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${AgentPoolInputObject}, + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] @@ -194,10 +225,11 @@ begin { } $mapping = @{ - Get = 'Az.Aks.private\Get-AzAksMaintenanceConfiguration_Get'; - GetViaIdentity = 'Az.Aks.private\Get-AzAksMaintenanceConfiguration_GetViaIdentity'; - GetViaIdentityManagedCluster = 'Az.Aks.private\Get-AzAksMaintenanceConfiguration_GetViaIdentityManagedCluster'; - List = 'Az.Aks.private\Get-AzAksMaintenanceConfiguration_List'; + Get = 'Az.Aks.private\Get-AzAksMachine_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksMachine_GetViaIdentity'; + GetViaIdentityAgentPool = 'Az.Aks.private\Get-AzAksMachine_GetViaIdentityAgentPool'; + GetViaIdentityManagedCluster = 'Az.Aks.private\Get-AzAksMachine_GetViaIdentityManagedCluster'; + List = 'Az.Aks.private\Get-AzAksMachine_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { @@ -261,16 +293,23 @@ end { <# .Synopsis -Gets the results of a command which has been run on the Managed Cluster. +Gets the specified maintenance configuration of a managed cluster. .Description -Gets the results of a command which has been run on the Managed Cluster. +Gets the specified maintenance configuration of a managed cluster. .Example -Get-AzAksManagedClusterCommandResult -ResourceGroupName mygroup -ResourceName mycluster -CommandId '706de66629b14267b4962cf015122c12' +Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster +.Example +Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' +.Example +$TimeSpan = New-AzAksTimeSpanObject -Start (Get-Date -Year 2023 -Month 3 -Day 1) -End (Get-Date -Year 2023 -Month 3 -Day 2) +$TimeInWeek = New-AzAksTimeInWeekObject -Day 'Sunday' -HourSlot 1,2 +$MaintenanceConfig = New-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' -TimeInWeek $TimeInWeek -NotAllowedTime $TimeSpan +$MaintenanceConfig | Get-AzAksMaintenanceConfiguration .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration .Notes COMPLEX PARAMETER PROPERTIES @@ -281,39 +320,46 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. MANAGEDCLUSTERINPUTOBJECT : Identity Parameter [AgentPoolName ]: The name of the agent pool. [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link -https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclustercommandresult +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmaintenanceconfiguration #> -function Get-AzAksManagedClusterCommandResult { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +function Get-AzAksMaintenanceConfiguration { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # Id of the command. - ${CommandId}, + # The name of the maintenance configuration. + ${ConfigName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the resource group. @@ -321,16 +367,19 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the managed cluster resource. ${ResourceName}, [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -374,12 +423,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Uri] @@ -435,11 +478,12 @@ begin { } $mapping = @{ - Get = 'Az.Aks.private\Get-AzAksManagedClusterCommandResult_Get'; - GetViaIdentity = 'Az.Aks.private\Get-AzAksManagedClusterCommandResult_GetViaIdentity'; - GetViaIdentityManagedCluster = 'Az.Aks.private\Get-AzAksManagedClusterCommandResult_GetViaIdentityManagedCluster'; + Get = 'Az.Aks.private\Get-AzAksMaintenanceConfiguration_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksMaintenanceConfiguration_GetViaIdentity'; + GetViaIdentityManagedCluster = 'Az.Aks.private\Get-AzAksMaintenanceConfiguration_GetViaIdentityManagedCluster'; + List = 'Az.Aks.private\Get-AzAksMaintenanceConfiguration_List'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -501,16 +545,16 @@ end { <# .Synopsis -Gets supported OS options in the specified subscription. +Gets the results of a command which has been run on the Managed Cluster. .Description -Gets supported OS options in the specified subscription. +Gets the results of a command which has been run on the Managed Cluster. .Example -Get-AzAksManagedClusterOSOption -Location eastus +Get-AzAksManagedClusterCommandResult -ResourceGroupName mygroup -ResourceName mycluster -CommandId '706de66629b14267b4962cf015122c12' .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult .Notes COMPLEX PARAMETER PROPERTIES @@ -521,30 +565,63 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +MANAGEDCLUSTERINPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link -https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclusterosoption +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclustercommandresult #> -function Get-AzAksManagedClusterOSOption { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile])] +function Get-AzAksManagedClusterCommandResult { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of Azure region. - ${Location}, + # Id of the command. + ${CommandId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -553,11 +630,11 @@ param( # Identity Parameter ${InputObject}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Query')] - [System.String] - # The resource type for which the OS options needs to be returned - ${ResourceType}, + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${ManagedClusterInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -588,6 +665,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Uri] @@ -643,8 +726,9 @@ begin { } $mapping = @{ - Get = 'Az.Aks.private\Get-AzAksManagedClusterOSOption_Get'; - GetViaIdentity = 'Az.Aks.private\Get-AzAksManagedClusterOSOption_GetViaIdentity'; + Get = 'Az.Aks.private\Get-AzAksManagedClusterCommandResult_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksManagedClusterCommandResult_GetViaIdentity'; + GetViaIdentityManagedCluster = 'Az.Aks.private\Get-AzAksManagedClusterCommandResult_GetViaIdentityManagedCluster'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { @@ -708,42 +792,33 @@ end { <# .Synopsis -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. +Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version .Description -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. +Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version .Example -$result = Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint -ResourceGroupName mygroup -ResourceName mycluster -$result | select Category,Endpoint +Get-AzAksManagedClusterKuberneteVersion -Location eastus .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOutboundEnvironmentEndpoint +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult .Link -https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclusteroutboundnetworkdependencyendpoint +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclusterkuberneteversion #> -function Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOutboundEnvironmentEndpoint])] +function Get-AzAksManagedClusterKuberneteVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] - [System.String] - # The name of the managed cluster resource. - ${ResourceName}, + # The name of the Azure region. + ${Location}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter()] @@ -830,7 +905,7 @@ begin { } $mapping = @{ - List = 'Az.Aks.private\Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint_List'; + List = 'Az.Aks.private\Get-AzAksManagedClusterKuberneteVersion_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { @@ -894,16 +969,16 @@ end { <# .Synopsis -Gets the upgrade profile for an agent pool. +Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades .Description -Gets the upgrade profile for an agent pool. +Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades .Example -Get-AzAksNodePoolUpgradeProfile -ResourceGroupName group -ClusterName myCluster -AgentPoolName default +Get-AzAksManagedClusterMeshRevisionProfile -Location eastus .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeProfile +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile .Notes COMPLEX PARAMETER PROPERTIES @@ -914,57 +989,58 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. -MANAGEDCLUSTERINPUTOBJECT : Identity Parameter +LOCATIONINPUTOBJECT : Identity Parameter [AgentPoolName ]: The name of the agent pool. [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link -https://learn.microsoft.com/powershell/module/az.aks/get-azaksnodepoolupgradeprofile +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclustermeshrevisionprofile #> -function Get-AzAksNodePoolUpgradeProfile { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeProfile])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +function Get-AzAksManagedClusterMeshRevisionProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of the managed cluster resource. - ${ClusterName}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory)] - [Alias('AgentPoolName')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] - [System.String] - # The name of the agent pool. - ${NodePoolName}, + # The name of the Azure region. + ${Location}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, + # The mode of the mesh. + ${Mode}, [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -973,11 +1049,11 @@ param( # Identity Parameter ${InputObject}, - [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] # Identity Parameter - ${ManagedClusterInputObject}, + ${LocationInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -1063,11 +1139,12 @@ begin { } $mapping = @{ - Get = 'Az.Aks.private\Get-AzAksNodePoolUpgradeProfile_Get'; - GetViaIdentity = 'Az.Aks.private\Get-AzAksNodePoolUpgradeProfile_GetViaIdentity'; - GetViaIdentityManagedCluster = 'Az.Aks.private\Get-AzAksNodePoolUpgradeProfile_GetViaIdentityManagedCluster'; + Get = 'Az.Aks.private\Get-AzAksManagedClusterMeshRevisionProfile_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksManagedClusterMeshRevisionProfile_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Aks.private\Get-AzAksManagedClusterMeshRevisionProfile_GetViaIdentityLocation'; + List = 'Az.Aks.private\Get-AzAksManagedClusterMeshRevisionProfile_List'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1129,24 +1206,16 @@ end { <# .Synopsis -Gets a snapshot. +Gets available upgrades for a service mesh in a cluster. .Description -Gets a snapshot. -.Example -Get-AzAksSnapshot -.Example -Get-AzAksSnapshot -ResourceGroupName mygroup -.Example -Get-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' +Gets available upgrades for a service mesh in a cluster. .Example -$pool = Get-AzAksNodePool -ResourceGroupName mygroup -ClusterName mycluster -Name default -$Snapshot = New-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' -Location eastus -SnapshotType 'NodePool' -CreationDataSourceResourceId $pool.Id -$Snapshot | Get-AzAksSnapshot +Get-AzAksManagedClusterMeshUpgradeProfile -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile .Notes COMPLEX PARAMETER PROPERTIES @@ -1157,21 +1226,46 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +MANAGEDCLUSTERINPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link -https://learn.microsoft.com/powershell/module/az.aks/get-azakssnapshot +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclustermeshupgradeprofile #> -function Get-AzAksSnapshot { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot])] +function Get-AzAksManagedClusterMeshUpgradeProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The mode of the mesh. + ${Mode}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the resource group. @@ -1179,6 +1273,7 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the managed cluster resource. @@ -1186,11 +1281,11 @@ param( [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] - [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -1199,6 +1294,12 @@ param( # Identity Parameter ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${ManagedClusterInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1283,12 +1384,12 @@ begin { } $mapping = @{ - Get = 'Az.Aks.private\Get-AzAksSnapshot_Get'; - GetViaIdentity = 'Az.Aks.private\Get-AzAksSnapshot_GetViaIdentity'; - List = 'Az.Aks.private\Get-AzAksSnapshot_List'; - List1 = 'Az.Aks.private\Get-AzAksSnapshot_List1'; + Get = 'Az.Aks.private\Get-AzAksManagedClusterMeshUpgradeProfile_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksManagedClusterMeshUpgradeProfile_GetViaIdentity'; + GetViaIdentityManagedCluster = 'Az.Aks.private\Get-AzAksManagedClusterMeshUpgradeProfile_GetViaIdentityManagedCluster'; + List = 'Az.Aks.private\Get-AzAksManagedClusterMeshUpgradeProfile_List'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1350,67 +1451,45 @@ end { <# .Synopsis -Gets the upgrade profile of a managed 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. .Description -Gets the upgrade profile of a managed 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. .Example -Get-AzAksUpgradeProfile -ResourceGroupName group -Name myCluster +$result = Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint -ResourceGroupName mygroup -ResourceName mycluster +$result | select Category,Endpoint -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterUpgradeProfile -.Notes -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - -INPUTOBJECT : Identity Parameter - [AgentPoolName ]: The name of the agent pool. - [CommandId ]: Id of the command. - [ConfigName ]: The name of the maintenance configuration. - [Id ]: Resource identity path - [Location ]: The name of Azure region. - [PrivateEndpointConnectionName ]: The name of the private endpoint connection. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ResourceName ]: The name of the managed cluster resource. - [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOutboundEnvironmentEndpoint .Link -https://learn.microsoft.com/powershell/module/az.aks/get-azaksupgradeprofile +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclusteroutboundnetworkdependencyendpoint #> -function Get-AzAksUpgradeProfile { -[Alias('Get-AzAksClusterUpgradeProfile')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterUpgradeProfile])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +function Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOutboundEnvironmentEndpoint])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('Name')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] - [System.String] - # The name of the managed cluster resource. - ${ClusterName}, - - [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Get')] + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] - # Identity Parameter - ${InputObject}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1495,10 +1574,9 @@ begin { } $mapping = @{ - Get = 'Az.Aks.private\Get-AzAksUpgradeProfile_Get'; - GetViaIdentity = 'Az.Aks.private\Get-AzAksUpgradeProfile_GetViaIdentity'; + List = 'Az.Aks.private\Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint_List'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1560,20 +1638,16 @@ end { <# .Synopsis -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. +Gets the upgrade profile for an agent pool. .Description -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. +Gets the upgrade profile for an agent pool. .Example -Invoke-AzAksAbortAgentPoolLatestOperation -ResourceGroupName mygroup -ResourceName mycluster -AgentPoolName 'pool1' +Get-AzAksNodePoolUpgradeProfile -ResourceGroupName group -ClusterName myCluster -AgentPoolName default .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -System.Boolean +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeProfile .Notes COMPLEX PARAMETER PROPERTIES @@ -1584,69 +1658,77 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. MANAGEDCLUSTERINPUTOBJECT : Identity Parameter [AgentPoolName ]: The name of the agent pool. [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link -https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksabortagentpoollatestoperation +https://learn.microsoft.com/powershell/module/az.aks/get-azaksnodepoolupgradeprofile #> -function Invoke-AzAksAbortAgentPoolLatestOperation { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Abort', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzAksNodePoolUpgradeProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeProfile])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='Abort', Mandatory)] - [Parameter(ParameterSetName='AbortViaIdentityManagedcluster', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ClusterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory)] + [Alias('AgentPoolName')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the agent pool. - ${AgentPoolName}, + ${NodePoolName}, - [Parameter(ParameterSetName='Abort', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Abort', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] - [System.String] - # The name of the managed cluster resource. - ${ResourceName}, - - [Parameter(ParameterSetName='Abort')] + [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] + [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='AbortViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] # Identity Parameter ${InputObject}, - [Parameter(ParameterSetName='AbortViaIdentityManagedcluster', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] # Identity Parameter - ${ManagedclusterInputObject}, + ${ManagedClusterInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -1657,12 +1739,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -1683,18 +1759,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Uri] @@ -1750,11 +1814,11 @@ begin { } $mapping = @{ - Abort = 'Az.Aks.private\Invoke-AzAksAbortAgentPoolLatestOperation_Abort'; - AbortViaIdentity = 'Az.Aks.private\Invoke-AzAksAbortAgentPoolLatestOperation_AbortViaIdentity'; - AbortViaIdentityManagedcluster = 'Az.Aks.private\Invoke-AzAksAbortAgentPoolLatestOperation_AbortViaIdentityManagedcluster'; + Get = 'Az.Aks.private\Get-AzAksNodePoolUpgradeProfile_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksNodePoolUpgradeProfile_GetViaIdentity'; + GetViaIdentityManagedCluster = 'Az.Aks.private\Get-AzAksNodePoolUpgradeProfile_GetViaIdentityManagedCluster'; } - if (('Abort') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1816,20 +1880,24 @@ end { <# .Synopsis -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. +Gets a snapshot. .Description -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. +Gets a snapshot. .Example -Invoke-AzAksAbortManagedClusterLatestOperation -ResourceGroupName mygroup -ResourceName mycluster +Get-AzAksSnapshot +.Example +Get-AzAksSnapshot -ResourceGroupName mygroup +.Example +Get-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' +.Example +$pool = Get-AzAksNodePool -ResourceGroupName mygroup -ClusterName mycluster -Name default +$Snapshot = New-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' -Location eastus -SnapshotType 'NodePool' -CreationDataSourceResourceId $pool.Id +$Snapshot | Get-AzAksSnapshot .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -System.Boolean +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot .Notes COMPLEX PARAMETER PROPERTIES @@ -1840,40 +1908,47 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link -https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksabortmanagedclusterlatestoperation +https://learn.microsoft.com/powershell/module/az.aks/get-azakssnapshot #> -function Invoke-AzAksAbortManagedClusterLatestOperation { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Abort', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzAksSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='Abort', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Abort', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the managed cluster resource. ${ResourceName}, - [Parameter(ParameterSetName='Abort')] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] + [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='AbortViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] # Identity Parameter @@ -1888,12 +1963,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -1914,18 +1983,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Uri] @@ -1981,10 +2038,12 @@ begin { } $mapping = @{ - Abort = 'Az.Aks.private\Invoke-AzAksAbortManagedClusterLatestOperation_Abort'; - AbortViaIdentity = 'Az.Aks.private\Invoke-AzAksAbortManagedClusterLatestOperation_AbortViaIdentity'; + Get = 'Az.Aks.private\Get-AzAksSnapshot_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksSnapshot_GetViaIdentity'; + List = 'Az.Aks.private\Get-AzAksSnapshot_List'; + List1 = 'Az.Aks.private\Get-AzAksSnapshot_List1'; } - if (('Abort') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2046,16 +2105,18 @@ end { <# .Synopsis -Rotates the service account signing keys of a managed cluster. +Get a trusted access role binding. .Description -Rotates the service account signing keys of a managed cluster. +Get a trusted access role binding. .Example -Invoke-AzAksRotateManagedClusterServiceAccountSigningKey -ResourceGroupName mygroup -ResourceName mycluster +Get-AzAksTrustedAccessRoleBinding -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster +.Example +Get-AzAksTrustedAccessRoleBinding -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster -Name testBinding .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -System.Boolean +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding .Notes COMPLEX PARAMETER PROPERTIES @@ -2066,45 +2127,81 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +MANAGEDCLUSTERINPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link -https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksrotatemanagedclusterserviceaccountsigningkey +https://learn.microsoft.com/powershell/module/az.aks/get-azakstrustedaccessrolebinding #> -function Invoke-AzAksRotateManagedClusterServiceAccountSigningKey { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Rotate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzAksTrustedAccessRoleBinding { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='Rotate', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory)] + [Alias('TrustedAccessRoleBindingName')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of trusted access role binding. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Rotate', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the managed cluster resource. ${ResourceName}, - [Parameter(ParameterSetName='Rotate')] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] + [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='RotateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] # Identity Parameter ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${ManagedClusterInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2114,12 +2211,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -2140,18 +2231,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Uri] @@ -2207,10 +2286,12 @@ begin { } $mapping = @{ - Rotate = 'Az.Aks.private\Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_Rotate'; - RotateViaIdentity = 'Az.Aks.private\Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity'; + Get = 'Az.Aks.private\Get-AzAksTrustedAccessRoleBinding_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksTrustedAccessRoleBinding_GetViaIdentity'; + GetViaIdentityManagedCluster = 'Az.Aks.private\Get-AzAksTrustedAccessRoleBinding_GetViaIdentityManagedCluster'; + List = 'Az.Aks.private\Get-AzAksTrustedAccessRoleBinding_List'; } - if (('Rotate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2272,87 +2353,35 @@ end { <# .Synopsis -create a maintenance configuration in the specified managed cluster. +List supported trusted access roles. .Description -create a maintenance configuration in the specified managed cluster. +List supported trusted access roles. .Example -$TimeSpan = New-AzAksTimeSpanObject -Start (Get-Date -Year 2023 -Month 3 -Day 1) -End (Get-Date -Year 2023 -Month 3 -Day 2) -$TimeInWeek = New-AzAksTimeInWeekObject -Day Sunday -HourSlot 1,2 -New-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' -TimeInWeek $TimeInWeek -NotAllowedTime $TimeSpan +Get-AzAksTrustedAccessRole -Location eastus .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration -.Notes -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - -NOTALLOWEDTIME : Time slots on which upgrade is not allowed. - [End ]: The end of a time span - [Start ]: The start of a time span - -TIMEINWEEK : If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. - [Day ]: The day of the week. - [HourSlot >]: Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole .Link -https://learn.microsoft.com/powershell/module/az.aks/new-azaksmaintenanceconfiguration +https://learn.microsoft.com/powershell/module/az.aks/get-azakstrustedaccessrole #> -function New-AzAksMaintenanceConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzAksTrustedAccessRole { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of the maintenance configuration. - ${ConfigName}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] - [System.String] - # The name of the managed cluster resource. - ${ResourceName}, + # The name of the Azure region. + ${Location}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] + [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='CreateExpanded')] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpan[]] - # Time slots on which upgrade is not allowed. - ${NotAllowedTime}, - - [Parameter(ParameterSetName='CreateExpanded')] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek[]] - # If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. - ${TimeInWeek}, - - [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] - [System.String] - # Path of Json file supplied to the Create operation - ${JsonFilePath}, - - [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] - [System.String] - # Json string supplied to the Create operation - ${JsonString}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2437,11 +2466,9 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.Aks.private\New-AzAksMaintenanceConfiguration_CreateExpanded'; - CreateViaJsonFilePath = 'Az.Aks.private\New-AzAksMaintenanceConfiguration_CreateViaJsonFilePath'; - CreateViaJsonString = 'Az.Aks.private\New-AzAksMaintenanceConfiguration_CreateViaJsonString'; + List = 'Az.Aks.private\Get-AzAksTrustedAccessRole_List'; } - if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2503,80 +2530,70 @@ end { <# .Synopsis -create a snapshot. +Gets the upgrade profile of a managed cluster. .Description -create a snapshot. +Gets the upgrade profile of a managed cluster. .Example -$pool = Get-AzAksNodePool -ResourceGroupName mygroup -ClusterName mycluster -Name default -New-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' -Location eastus -SnapshotType 'NodePool' -CreationDataSourceResourceId $pool.Id +Get-AzAksUpgradeProfile -ResourceGroupName group -Name myCluster +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterUpgradeProfile +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link -https://learn.microsoft.com/powershell/module/az.aks/new-azakssnapshot +https://learn.microsoft.com/powershell/module/az.aks/get-azaksupgradeprofile #> -function New-AzAksSnapshot { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzAksUpgradeProfile { +[Alias('Get-AzAksClusterUpgradeProfile')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterUpgradeProfile])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Name')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, + # The name of the managed cluster resource. + ${ClusterName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of the managed cluster resource. - ${ResourceName}, + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] + [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] - [System.String] - # This is the ARM ID of the source object to be used to create the target object. - ${CreationDataSourceResourceId}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("NodePool")] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] - [System.String] - # The type of a snapshot. - # The default is NodePool. - ${SnapshotType}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrackedResourceTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - - [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] - [System.String] - # Path of Json file supplied to the Create operation - ${JsonFilePath}, - - [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] - [System.String] - # Json string supplied to the Create operation - ${JsonString}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -2662,11 +2679,10 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.Aks.private\New-AzAksSnapshot_CreateExpanded'; - CreateViaJsonFilePath = 'Az.Aks.private\New-AzAksSnapshot_CreateViaJsonFilePath'; - CreateViaJsonString = 'Az.Aks.private\New-AzAksSnapshot_CreateViaJsonString'; + Get = 'Az.Aks.private\Get-AzAksUpgradeProfile_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksUpgradeProfile_GetViaIdentity'; } - if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2728,14 +2744,15 @@ end { <# .Synopsis -Deletes a maintenance configuration. +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. .Description -Deletes a maintenance configuration. -.Example -Remove-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName mycluster -ConfigName 'aks_maintenance_config' +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. .Example -$MaintenanceConfig = Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' -$MaintenanceConfig | Remove-AzAksMaintenanceConfiguration +Invoke-AzAksAbortAgentPoolLatestOperation -ResourceGroupName mygroup -ResourceName mycluster -AgentPoolName 'pool1' .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity @@ -2751,69 +2768,76 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. MANAGEDCLUSTERINPUTOBJECT : Identity Parameter [AgentPoolName ]: The name of the agent pool. [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link -https://learn.microsoft.com/powershell/module/az.aks/remove-azaksmaintenanceconfiguration +https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksabortagentpoollatestoperation #> -function Remove-AzAksMaintenanceConfiguration { +function Invoke-AzAksAbortAgentPoolLatestOperation { [OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='Abort', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Delete', Mandatory)] - [Parameter(ParameterSetName='DeleteViaIdentityManagedCluster', Mandatory)] + [Parameter(ParameterSetName='Abort', Mandatory)] + [Parameter(ParameterSetName='AbortViaIdentityManagedcluster', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of the maintenance configuration. - ${ConfigName}, + # The name of the agent pool. + ${AgentPoolName}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='Abort', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='Abort', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the managed cluster resource. ${ResourceName}, - [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='Abort')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AbortViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] # Identity Parameter ${InputObject}, - [Parameter(ParameterSetName='DeleteViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AbortViaIdentityManagedcluster', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] # Identity Parameter - ${ManagedClusterInputObject}, + ${ManagedclusterInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -2824,6 +2848,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -2844,6 +2874,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -2905,11 +2941,11 @@ begin { } $mapping = @{ - Delete = 'Az.Aks.private\Remove-AzAksMaintenanceConfiguration_Delete'; - DeleteViaIdentity = 'Az.Aks.private\Remove-AzAksMaintenanceConfiguration_DeleteViaIdentity'; - DeleteViaIdentityManagedCluster = 'Az.Aks.private\Remove-AzAksMaintenanceConfiguration_DeleteViaIdentityManagedCluster'; + Abort = 'Az.Aks.private\Invoke-AzAksAbortAgentPoolLatestOperation_Abort'; + AbortViaIdentity = 'Az.Aks.private\Invoke-AzAksAbortAgentPoolLatestOperation_AbortViaIdentity'; + AbortViaIdentityManagedcluster = 'Az.Aks.private\Invoke-AzAksAbortAgentPoolLatestOperation_AbortViaIdentityManagedcluster'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Abort') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2971,14 +3007,15 @@ end { <# .Synopsis -Deletes a snapshot. +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. .Description -Deletes a snapshot. -.Example -Remove-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' +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. .Example -$Snapshot = Get-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' -$Snapshot | Remove-AzAksSnapshot +Invoke-AzAksAbortManagedClusterLatestOperation -ResourceGroupName mygroup -ResourceName mycluster .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity @@ -2994,40 +3031,44 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link -https://learn.microsoft.com/powershell/module/az.aks/remove-azakssnapshot +https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksabortmanagedclusterlatestoperation #> -function Remove-AzAksSnapshot { +function Invoke-AzAksAbortManagedClusterLatestOperation { [OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='Abort', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='Abort', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='Abort', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the managed cluster resource. ${ResourceName}, - [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='Abort')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AbortViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] # Identity Parameter @@ -3042,7 +3083,13 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter(DontShow)] + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach @@ -3062,6 +3109,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -3123,10 +3176,10 @@ begin { } $mapping = @{ - Delete = 'Az.Aks.private\Remove-AzAksSnapshot_Delete'; - DeleteViaIdentity = 'Az.Aks.private\Remove-AzAksSnapshot_DeleteViaIdentity'; + Abort = 'Az.Aks.private\Invoke-AzAksAbortManagedClusterLatestOperation_Abort'; + AbortViaIdentity = 'Az.Aks.private\Invoke-AzAksAbortManagedClusterLatestOperation_AbortViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Abort') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3188,13 +3241,11 @@ end { <# .Synopsis -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. .Description -See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. -.Example -Start-AzAksCluster -ResourceGroupName group -Name myCluster +Rotates the service account signing keys of a managed cluster. .Example -Get-AzAksCluster -ResourceGroupName group -Name myCluster | Start-AzAksCluster +Invoke-AzAksRotateManagedClusterServiceAccountSigningKey -ResourceGroupName mygroup -ResourceName mycluster .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity @@ -3210,41 +3261,44 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link -https://learn.microsoft.com/powershell/module/az.aks/start-azakscluster +https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksrotatemanagedclusterserviceaccountsigningkey #> -function Start-AzAksCluster { +function Invoke-AzAksRotateManagedClusterServiceAccountSigningKey { [OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='Rotate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Start', Mandatory)] - [Alias('ClusterName')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] - [System.String] - # The name of the managed cluster resource. - ${Name}, - - [Parameter(ParameterSetName='Start', Mandatory)] + [Parameter(ParameterSetName='Rotate', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Start')] + [Parameter(ParameterSetName='Rotate', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='Rotate')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='StartViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RotateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] # Identity Parameter @@ -3352,10 +3406,10 @@ begin { } $mapping = @{ - Start = 'Az.Aks.private\Start-AzAksCluster_Start'; - StartViaIdentity = 'Az.Aks.private\Start-AzAksCluster_StartViaIdentity'; + Rotate = 'Az.Aks.private\Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_Rotate'; + RotateViaIdentity = 'Az.Aks.private\Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity'; } - if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Rotate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3417,109 +3471,183 @@ end { <# .Synopsis -AKS will run 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). +Create a maintenance configuration in the specified managed cluster. .Description -AKS will run 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). +Create a maintenance configuration in the specified managed cluster. .Example -Start-AzAksManagedClusterCommand -ResourceGroupName mygroup -ResourceName mycluster -Command "kubectl get nodes" -.Example -$cluster = Get-AzAksCluster -ResourceGroupName mygroup -Name mycluster -$cluster | Start-AzAksManagedClusterCommand -Command "kubectl get nodes" +$TimeSpan = New-AzAksTimeSpanObject -Start (Get-Date -Year 2023 -Month 3 -Day 1) -End (Get-Date -Year 2023 -Month 3 -Day 2) +$TimeInWeek = New-AzAksTimeInWeekObject -Day Sunday -HourSlot 1,2 +New-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' -TimeInWeek $TimeInWeek -NotAllowedTime $TimeSpan -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter - [AgentPoolName ]: The name of the agent pool. - [CommandId ]: Id of the command. - [ConfigName ]: The name of the maintenance configuration. - [Id ]: Resource identity path - [Location ]: The name of Azure region. - [PrivateEndpointConnectionName ]: The name of the private endpoint connection. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ResourceName ]: The name of the managed cluster resource. - [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. +MAINTENANCEWINDOWNOTALLOWEDDATE : Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. + End : The end date of the date span. + Start : The start date of the date span. + +NOTALLOWEDTIME : Time slots on which upgrade is not allowed. + [End ]: The end of a time span + [Start ]: The start of a time span + +TIMEINWEEK : 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. + [Day ]: The day of the week. + [HourSlot >]: A list of hours in the day used to identify a time range. Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. .Link -https://learn.microsoft.com/powershell/module/az.aks/start-azaksmanagedclustercommand +https://learn.microsoft.com/powershell/module/az.aks/new-azaksmaintenanceconfiguration #> -function Start-AzAksManagedClusterCommand { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult])] -[CmdletBinding(DefaultParameterSetName='RunExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function New-AzAksMaintenanceConfiguration { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='RunExpanded', Mandatory)] - [Parameter(ParameterSetName='RunViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='RunViaJsonString', Mandatory)] + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the maintenance configuration. + ${ConfigName}, + + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='RunExpanded', Mandatory)] - [Parameter(ParameterSetName='RunViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='RunViaJsonString', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the managed cluster resource. ${ResourceName}, - [Parameter(ParameterSetName='RunExpanded')] - [Parameter(ParameterSetName='RunViaJsonFilePath')] - [Parameter(ParameterSetName='RunViaJsonString')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='RunViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] - # Identity Parameter - ${InputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # The date of the month. + ${AbsoluteMonthlyDayOfMonth}, - [Parameter(ParameterSetName='RunExpanded', Mandatory)] - [Parameter(ParameterSetName='RunViaIdentityExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of months between each set of occurrences. + ${AbsoluteMonthlyIntervalMonth}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of days between each set of occurrences. + ${DailyIntervalDay}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Length of maintenance window range from 4 to 24 hours. + ${MaintenanceWindowDurationHour}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan[]] + # Date ranges on which upgrade is not allowed. + # 'utcOffset' applies to this field. + # For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. + ${MaintenanceWindowNotAllowedDate}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.DateTime] + # The date the maintenance window activates. + # If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. + # If not specified, the maintenance window will be active right away. + ${MaintenanceWindowStartDate}, + + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] [System.String] - # The command to run. - ${Command}, + # The start time of the maintenance window. + # Accepted values are from '00:00' to '23:59'. + # 'utcOffset' applies to this field. + # For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + ${MaintenanceWindowStartTime}, - [Parameter(ParameterSetName='RunExpanded')] - [Parameter(ParameterSetName='RunViaIdentityExpanded')] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] [System.String] - # AuthToken issued for AKS AAD Server App. - ${ClusterToken}, + # The UTC offset in format +/-HH:mm. + # For example, '+05:30' for IST and '-07:00' for PST. + # If not specified, the default is '+00:00'. + ${MaintenanceWindowUtcOffset}, - [Parameter(ParameterSetName='RunExpanded')] - [Parameter(ParameterSetName='RunViaIdentityExpanded')] + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpan[]] + # Time slots on which upgrade is not allowed. + ${NotAllowedTime}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] [System.String] - # A base64 encoded zip file containing the files required by the command. - ${Context}, + # Specifies on which day of the week the maintenance occurs. + ${RelativeMonthlyDayOfWeek}, - [Parameter(ParameterSetName='RunViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of months between each set of occurrences. + ${RelativeMonthlyIntervalMonth}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] [System.String] - # Path of Json file supplied to the Run operation + # The week index. + # Specifies on which week of the month the dayOfWeek applies. + ${RelativeMonthlyWeekIndex}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek[]] + # 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. + ${TimeInWeek}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Specifies on which day of the week the maintenance occurs. + ${WeeklyDayOfWeek}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of weeks between each set of occurrences. + ${WeeklyIntervalWeek}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation ${JsonFilePath}, - [Parameter(ParameterSetName='RunViaJsonString', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] [System.String] - # Json string supplied to the Run operation + # Json string supplied to the Create operation ${JsonString}, [Parameter()] @@ -3531,12 +3659,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -3557,12 +3679,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Uri] @@ -3618,12 +3734,11 @@ begin { } $mapping = @{ - RunExpanded = 'Az.Aks.private\Start-AzAksManagedClusterCommand_RunExpanded'; - RunViaIdentityExpanded = 'Az.Aks.private\Start-AzAksManagedClusterCommand_RunViaIdentityExpanded'; - RunViaJsonFilePath = 'Az.Aks.private\Start-AzAksManagedClusterCommand_RunViaJsonFilePath'; - RunViaJsonString = 'Az.Aks.private\Start-AzAksManagedClusterCommand_RunViaJsonString'; + CreateExpanded = 'Az.Aks.private\New-AzAksMaintenanceConfiguration_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Aks.private\New-AzAksMaintenanceConfiguration_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Aks.private\New-AzAksMaintenanceConfiguration_CreateViaJsonString'; } - if (('RunExpanded', 'RunViaJsonFilePath', 'RunViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3685,74 +3800,2441 @@ end { <# .Synopsis -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. +Create a snapshot. .Description -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. -.Example -Stop-AzAksCluster -ResourceGroupName group -Name myCluster +Create a snapshot. .Example -Get-AzAksCluster -ResourceGroupName group -Name myCluster | Stop-AzAksCluster +$pool = Get-AzAksNodePool -ResourceGroupName mygroup -ClusterName mycluster -Name default +New-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' -Location eastus -SnapshotType 'NodePool' -CreationDataSourceResourceId $pool.Id -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -System.Boolean -.Notes -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - -INPUTOBJECT : Identity Parameter - [AgentPoolName ]: The name of the agent pool. - [CommandId ]: Id of the command. - [ConfigName ]: The name of the maintenance configuration. - [Id ]: Resource identity path - [Location ]: The name of Azure region. - [PrivateEndpointConnectionName ]: The name of the private endpoint connection. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ResourceName ]: The name of the managed cluster resource. - [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot .Link -https://learn.microsoft.com/powershell/module/az.aks/stop-azakscluster +https://learn.microsoft.com/powershell/module/az.aks/new-azakssnapshot #> -function Stop-AzAksCluster { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function New-AzAksSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Stop', Mandatory)] - [Alias('ClusterName')] + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # This is the ARM ID of the source object to be used to create the target object. + ${CreationDataSourceResourceId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("NodePool")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The type of a snapshot. + # The default is NodePool. + ${SnapshotType}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Aks.private\New-AzAksSnapshot_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Aks.private\New-AzAksSnapshot_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Aks.private\New-AzAksSnapshot_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a trusted access role binding +.Description +Create a trusted access role binding +.Example +New-AzAksTrustedAccessRoleBinding -Name testBinding -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster -Role 'Microsoft.MachineLearningServices/workspaces/mlworkload' -SourceResourceId "/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/AKS_TEST_RG/providers/Microsoft.MachineLearningServices/workspaces/TestAML001" + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding +.Link +https://learn.microsoft.com/powershell/module/az.aks/new-azakstrustedaccessrolebinding +#> +function New-AzAksTrustedAccessRoleBinding { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('TrustedAccessRoleBindingName')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of trusted access role binding. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String[]] + # A list of roles to bind, each item is a resource type qualified role name. + # For example: 'Microsoft.MachineLearningServices/workspaces/reader'. + ${Role}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The ARM resource ID of source resource that trusted access is configured for. + ${SourceResourceId}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Aks.private\New-AzAksTrustedAccessRoleBinding_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Aks.private\New-AzAksTrustedAccessRoleBinding_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Aks.private\New-AzAksTrustedAccessRoleBinding_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes specific machines in an agent pool. +.Description +Deletes specific machines in an agent pool. +.Example +Remove-AzAksAgentPoolMachine -AgentPoolName pool1 -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster -MachineName 'aks-pool1-12988240-vmss000008' + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +MACHINE : Specifies a list of machine names from the agent pool to be deleted. + MachineName >: The agent pool machine names. + +MANAGEDCLUSTERINPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. +.Link +https://learn.microsoft.com/powershell/module/az.aks/remove-azaksagentpoolmachine +#> +function Remove-AzAksAgentPoolMachine { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='DeleteExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteExpanded', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityManagedCluster', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityManagedClusterExpanded', Mandatory)] + [Parameter(ParameterSetName='DeleteViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='DeleteViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the agent pool. + ${AgentPoolName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteExpanded', Mandatory)] + [Parameter(ParameterSetName='DeleteViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='DeleteViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteExpanded', Mandatory)] + [Parameter(ParameterSetName='DeleteViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='DeleteViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='DeleteExpanded')] + [Parameter(ParameterSetName='DeleteViaJsonFilePath')] + [Parameter(ParameterSetName='DeleteViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentityManagedClusterExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${ManagedClusterInputObject}, + + [Parameter(ParameterSetName='Delete', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter] + # Specifies a list of machine names from the agent pool to be deleted. + ${Machine}, + + [Parameter(ParameterSetName='DeleteExpanded', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityExpanded', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityManagedClusterExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String[]] + # The agent pool machine names. + ${MachineName}, + + [Parameter(ParameterSetName='DeleteViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Path of Json file supplied to the Delete operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='DeleteViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Json string supplied to the Delete operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_Delete'; + DeleteExpanded = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_DeleteExpanded'; + DeleteViaIdentity = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_DeleteViaIdentity'; + DeleteViaIdentityExpanded = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_DeleteViaIdentityExpanded'; + DeleteViaIdentityManagedCluster = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_DeleteViaIdentityManagedCluster'; + DeleteViaIdentityManagedClusterExpanded = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_DeleteViaIdentityManagedClusterExpanded'; + DeleteViaJsonFilePath = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_DeleteViaJsonFilePath'; + DeleteViaJsonString = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_DeleteViaJsonString'; + } + if (('Delete', 'DeleteExpanded', 'DeleteViaJsonFilePath', 'DeleteViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes a maintenance configuration. +.Description +Deletes a maintenance configuration. +.Example +Remove-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName mycluster -ConfigName 'aks_maintenance_config' +.Example +$MaintenanceConfig = Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' +$MaintenanceConfig | Remove-AzAksMaintenanceConfiguration + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +MANAGEDCLUSTERINPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. +.Link +https://learn.microsoft.com/powershell/module/az.aks/remove-azaksmaintenanceconfiguration +#> +function Remove-AzAksMaintenanceConfiguration { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityManagedCluster', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the maintenance configuration. + ${ConfigName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${ManagedClusterInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Aks.private\Remove-AzAksMaintenanceConfiguration_Delete'; + DeleteViaIdentity = 'Az.Aks.private\Remove-AzAksMaintenanceConfiguration_DeleteViaIdentity'; + DeleteViaIdentityManagedCluster = 'Az.Aks.private\Remove-AzAksMaintenanceConfiguration_DeleteViaIdentityManagedCluster'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes a snapshot. +.Description +Deletes a snapshot. +.Example +Remove-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' +.Example +$Snapshot = Get-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' +$Snapshot | Remove-AzAksSnapshot + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. +.Link +https://learn.microsoft.com/powershell/module/az.aks/remove-azakssnapshot +#> +function Remove-AzAksSnapshot { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Aks.private\Remove-AzAksSnapshot_Delete'; + DeleteViaIdentity = 'Az.Aks.private\Remove-AzAksSnapshot_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a trusted access role binding. +.Description +Delete a trusted access role binding. +.Example +Remove-AzAksTrustedAccessRoleBinding -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster -Name testBinding + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +MANAGEDCLUSTERINPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. +.Link +https://learn.microsoft.com/powershell/module/az.aks/remove-azakstrustedaccessrolebinding +#> +function Remove-AzAksTrustedAccessRoleBinding { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityManagedCluster', Mandatory)] + [Alias('TrustedAccessRoleBindingName')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of trusted access role binding. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${ManagedClusterInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Aks.private\Remove-AzAksTrustedAccessRoleBinding_Delete'; + DeleteViaIdentity = 'Az.Aks.private\Remove-AzAksTrustedAccessRoleBinding_DeleteViaIdentity'; + DeleteViaIdentityManagedCluster = 'Az.Aks.private\Remove-AzAksTrustedAccessRoleBinding_DeleteViaIdentityManagedCluster'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. +.Description +See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. +.Example +Start-AzAksCluster -ResourceGroupName group -Name myCluster +.Example +Get-AzAksCluster -ResourceGroupName group -Name myCluster | Start-AzAksCluster + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. +.Link +https://learn.microsoft.com/powershell/module/az.aks/start-azakscluster +#> +function Start-AzAksCluster { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Start', Mandatory)] + [Alias('ClusterName')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${Name}, + + [Parameter(ParameterSetName='Start', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Start')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='StartViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Start = 'Az.Aks.private\Start-AzAksCluster_Start'; + StartViaIdentity = 'Az.Aks.private\Start-AzAksCluster_StartViaIdentity'; + } + if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +AKS will run 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). +.Description +AKS will run 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). +.Example +Start-AzAksManagedClusterCommand -ResourceGroupName mygroup -ResourceName mycluster -Command "kubectl get nodes" +.Example +$cluster = Get-AzAksCluster -ResourceGroupName mygroup -Name mycluster +$cluster | Start-AzAksManagedClusterCommand -Command "kubectl get nodes" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. +.Link +https://learn.microsoft.com/powershell/module/az.aks/start-azaksmanagedclustercommand +#> +function Start-AzAksManagedClusterCommand { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult])] +[CmdletBinding(DefaultParameterSetName='RunExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='RunExpanded', Mandatory)] + [Parameter(ParameterSetName='RunViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RunViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='RunExpanded', Mandatory)] + [Parameter(ParameterSetName='RunViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RunViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='RunExpanded')] + [Parameter(ParameterSetName='RunViaJsonFilePath')] + [Parameter(ParameterSetName='RunViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RunViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='RunExpanded', Mandatory)] + [Parameter(ParameterSetName='RunViaIdentityExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The command to run. + ${Command}, + + [Parameter(ParameterSetName='RunExpanded')] + [Parameter(ParameterSetName='RunViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # AuthToken issued for AKS AAD Server App. + ${ClusterToken}, + + [Parameter(ParameterSetName='RunExpanded')] + [Parameter(ParameterSetName='RunViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # A base64 encoded zip file containing the files required by the command. + ${Context}, + + [Parameter(ParameterSetName='RunViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Path of Json file supplied to the Run operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RunViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Json string supplied to the Run operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + RunExpanded = 'Az.Aks.private\Start-AzAksManagedClusterCommand_RunExpanded'; + RunViaIdentityExpanded = 'Az.Aks.private\Start-AzAksManagedClusterCommand_RunViaIdentityExpanded'; + RunViaJsonFilePath = 'Az.Aks.private\Start-AzAksManagedClusterCommand_RunViaJsonFilePath'; + RunViaJsonString = 'Az.Aks.private\Start-AzAksManagedClusterCommand_RunViaJsonString'; + } + if (('RunExpanded', 'RunViaJsonFilePath', 'RunViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +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. +.Description +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. +.Example +Stop-AzAksCluster -ResourceGroupName group -Name myCluster +.Example +Get-AzAksCluster -ResourceGroupName group -Name myCluster | Stop-AzAksCluster + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. +.Link +https://learn.microsoft.com/powershell/module/az.aks/stop-azakscluster +#> +function Stop-AzAksCluster { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Stop', Mandatory)] + [Alias('ClusterName')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the managed cluster resource. ${Name}, - [Parameter(ParameterSetName='Stop', Mandatory)] + [Parameter(ParameterSetName='Stop', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Stop')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='StopViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Stop = 'Az.Aks.private\Stop-AzAksCluster_Stop'; + StopViaIdentity = 'Az.Aks.private\Stop-AzAksCluster_StopViaIdentity'; + } + if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a maintenance configuration in the specified managed cluster. +.Description +Update a maintenance configuration in the specified managed cluster. +.Example +$TimeSpan = New-AzAksTimeSpanObject -Start (Get-Date -Year 2023 -Month 3 -Day 2) -End (Get-Date -Year 2023 -Month 3 -Day 3) +$TimeInWeek = New-AzAksTimeInWeekObject -Day Sunday -HourSlot 2,3 +Update-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' -TimeInWeek $TimeInWeek -NotAllowedTime $TimeSpan + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +MAINTENANCEWINDOWNOTALLOWEDDATE : Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. + End : The end date of the date span. + Start : The start date of the date span. + +NOTALLOWEDTIME : Time slots on which upgrade is not allowed. + [End ]: The end of a time span + [Start ]: The start of a time span + +TIMEINWEEK : 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. + [Day ]: The day of the week. + [HourSlot >]: A list of hours in the day used to identify a time range. Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. +.Link +https://learn.microsoft.com/powershell/module/az.aks/update-azaksmaintenanceconfiguration +#> +function Update-AzAksMaintenanceConfiguration { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the maintenance configuration. + ${ConfigName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Stop')] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='StopViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] # Identity Parameter ${InputObject}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # The date of the month. + ${AbsoluteMonthlyDayOfMonth}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of months between each set of occurrences. + ${AbsoluteMonthlyIntervalMonth}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of days between each set of occurrences. + ${DailyIntervalDay}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Length of maintenance window range from 4 to 24 hours. + ${MaintenanceWindowDurationHour}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan[]] + # Date ranges on which upgrade is not allowed. + # 'utcOffset' applies to this field. + # For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. + ${MaintenanceWindowNotAllowedDate}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.DateTime] + # The date the maintenance window activates. + # If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. + # If not specified, the maintenance window will be active right away. + ${MaintenanceWindowStartDate}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The start time of the maintenance window. + # Accepted values are from '00:00' to '23:59'. + # 'utcOffset' applies to this field. + # For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + ${MaintenanceWindowStartTime}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The UTC offset in format +/-HH:mm. + # For example, '+05:30' for IST and '-07:00' for PST. + # If not specified, the default is '+00:00'. + ${MaintenanceWindowUtcOffset}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpan[]] + # Time slots on which upgrade is not allowed. + ${NotAllowedTime}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Specifies on which day of the week the maintenance occurs. + ${RelativeMonthlyDayOfWeek}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of months between each set of occurrences. + ${RelativeMonthlyIntervalMonth}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The week index. + # Specifies on which week of the month the dayOfWeek applies. + ${RelativeMonthlyWeekIndex}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek[]] + # 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. + ${TimeInWeek}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Specifies on which day of the week the maintenance occurs. + ${WeeklyDayOfWeek}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of weeks between each set of occurrences. + ${WeeklyIntervalWeek}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3762,12 +6244,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -3788,18 +6264,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Uri] @@ -3855,10 +6319,10 @@ begin { } $mapping = @{ - Stop = 'Az.Aks.private\Stop-AzAksCluster_Stop'; - StopViaIdentity = 'Az.Aks.private\Stop-AzAksCluster_StopViaIdentity'; + UpdateExpanded = 'Az.Aks.private\Update-AzAksMaintenanceConfiguration_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Aks.private\Update-AzAksMaintenanceConfiguration_UpdateViaIdentityExpanded'; } - if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3920,18 +6384,16 @@ end { <# .Synopsis -update a maintenance configuration in the specified managed cluster. +Update a trusted access role binding .Description -update a maintenance configuration in the specified managed cluster. +Update a trusted access role binding .Example -$TimeSpan = New-AzAksTimeSpanObject -Start (Get-Date -Year 2023 -Month 3 -Day 2) -End (Get-Date -Year 2023 -Month 3 -Day 3) -$TimeInWeek = New-AzAksTimeInWeekObject -Day Sunday -HourSlot 2,3 -Update-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' -TimeInWeek $TimeInWeek -NotAllowedTime $TimeSpan +Update-AzAksTrustedAccessRoleBinding -Name testBinding -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster -Role 'Microsoft.MachineLearningServices/workspaces/inference-v1' .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding .Notes COMPLEX PARAMETER PROPERTIES @@ -3942,32 +6404,28 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. - -NOTALLOWEDTIME : Time slots on which upgrade is not allowed. - [End ]: The end of a time span - [Start ]: The start of a time span - -TIMEINWEEK : If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. - [Day ]: The day of the week. - [HourSlot >]: Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link -https://learn.microsoft.com/powershell/module/az.aks/update-azaksmaintenanceconfiguration +https://learn.microsoft.com/powershell/module/az.aks/update-azakstrustedaccessrolebinding #> -function Update-AzAksMaintenanceConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration])] +function Update-AzAksTrustedAccessRoleBinding { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('TrustedAccessRoleBindingName')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of the maintenance configuration. - ${ConfigName}, + # The name of trusted access role binding. + ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] @@ -3987,6 +6445,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] @@ -3998,16 +6457,16 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpan[]] - # Time slots on which upgrade is not allowed. - ${NotAllowedTime}, + [System.String[]] + # A list of roles to bind, each item is a resource type qualified role name. + # For example: 'Microsoft.MachineLearningServices/workspaces/reader'. + ${Role}, [Parameter()] - [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek[]] - # If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. - ${TimeInWeek}, + [System.String] + # The ARM resource ID of source resource that trusted access is configured for. + ${SourceResourceId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -4018,6 +6477,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -4038,6 +6503,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] [System.Uri] @@ -4093,8 +6564,8 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.Aks.private\Update-AzAksMaintenanceConfiguration_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.Aks.private\Update-AzAksMaintenanceConfiguration_UpdateViaIdentityExpanded'; + UpdateExpanded = 'Az.Aks.private\Update-AzAksTrustedAccessRoleBinding_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Aks.private\Update-AzAksTrustedAccessRoleBinding_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { @@ -4534,6 +7005,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] [System.Int32[]] + # A list of hours in the day used to identify a time range. # Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). # 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. # Specifying [0, 1] means the 00:00 - 02:00 UTC time range. diff --git a/generated/Aks/Aks.Autorest/exports/Remove-AzAksAgentPoolMachine.ps1 b/generated/Aks/Aks.Autorest/exports/Remove-AzAksAgentPoolMachine.ps1 new file mode 100644 index 000000000000..a9e63b094203 --- /dev/null +++ b/generated/Aks/Aks.Autorest/exports/Remove-AzAksAgentPoolMachine.ps1 @@ -0,0 +1,328 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes specific machines in an agent pool. +.Description +Deletes specific machines in an agent pool. +.Example +Remove-AzAksAgentPoolMachine -AgentPoolName pool1 -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster -MachineName 'aks-pool1-12988240-vmss000008' + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +MACHINE : Specifies a list of machine names from the agent pool to be deleted. + MachineName >: The agent pool machine names. + +MANAGEDCLUSTERINPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. +.Link +https://learn.microsoft.com/powershell/module/az.aks/remove-azaksagentpoolmachine +#> +function Remove-AzAksAgentPoolMachine { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='DeleteExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteExpanded', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityManagedCluster', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityManagedClusterExpanded', Mandatory)] + [Parameter(ParameterSetName='DeleteViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='DeleteViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the agent pool. + ${AgentPoolName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteExpanded', Mandatory)] + [Parameter(ParameterSetName='DeleteViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='DeleteViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteExpanded', Mandatory)] + [Parameter(ParameterSetName='DeleteViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='DeleteViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='DeleteExpanded')] + [Parameter(ParameterSetName='DeleteViaJsonFilePath')] + [Parameter(ParameterSetName='DeleteViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentityManagedClusterExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${ManagedClusterInputObject}, + + [Parameter(ParameterSetName='Delete', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter] + # Specifies a list of machine names from the agent pool to be deleted. + ${Machine}, + + [Parameter(ParameterSetName='DeleteExpanded', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityExpanded', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityManagedClusterExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String[]] + # The agent pool machine names. + ${MachineName}, + + [Parameter(ParameterSetName='DeleteViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Path of Json file supplied to the Delete operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='DeleteViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Json string supplied to the Delete operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_Delete'; + DeleteExpanded = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_DeleteExpanded'; + DeleteViaIdentity = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_DeleteViaIdentity'; + DeleteViaIdentityExpanded = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_DeleteViaIdentityExpanded'; + DeleteViaIdentityManagedCluster = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_DeleteViaIdentityManagedCluster'; + DeleteViaIdentityManagedClusterExpanded = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_DeleteViaIdentityManagedClusterExpanded'; + DeleteViaJsonFilePath = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_DeleteViaJsonFilePath'; + DeleteViaJsonString = 'Az.Aks.private\Remove-AzAksAgentPoolMachine_DeleteViaJsonString'; + } + if (('Delete', 'DeleteExpanded', 'DeleteViaJsonFilePath', 'DeleteViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/generated/Aks/Aks.Autorest/exports/Remove-AzAksMaintenanceConfiguration.ps1 b/generated/Aks/Aks.Autorest/exports/Remove-AzAksMaintenanceConfiguration.ps1 index 44c40e307029..23c1472c21d1 100644 --- a/generated/Aks/Aks.Autorest/exports/Remove-AzAksMaintenanceConfiguration.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Remove-AzAksMaintenanceConfiguration.ps1 @@ -39,24 +39,30 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. MANAGEDCLUSTERINPUTOBJECT : Identity Parameter [AgentPoolName ]: The name of the agent pool. [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link https://learn.microsoft.com/powershell/module/az.aks/remove-azaksmaintenanceconfiguration #> @@ -89,6 +95,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/Aks/Aks.Autorest/exports/Remove-AzAksSnapshot.ps1 b/generated/Aks/Aks.Autorest/exports/Remove-AzAksSnapshot.ps1 index e07d47a544e4..588640c4230d 100644 --- a/generated/Aks/Aks.Autorest/exports/Remove-AzAksSnapshot.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Remove-AzAksSnapshot.ps1 @@ -39,12 +39,15 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link https://learn.microsoft.com/powershell/module/az.aks/remove-azakssnapshot #> @@ -70,6 +73,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/Aks/Aks.Autorest/exports/Remove-AzAksTrustedAccessRoleBinding.ps1 b/generated/Aks/Aks.Autorest/exports/Remove-AzAksTrustedAccessRoleBinding.ps1 new file mode 100644 index 000000000000..454cdeaa36ab --- /dev/null +++ b/generated/Aks/Aks.Autorest/exports/Remove-AzAksTrustedAccessRoleBinding.ps1 @@ -0,0 +1,275 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a trusted access role binding. +.Description +Delete a trusted access role binding. +.Example +Remove-AzAksTrustedAccessRoleBinding -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster -Name testBinding + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +MANAGEDCLUSTERINPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. +.Link +https://learn.microsoft.com/powershell/module/az.aks/remove-azakstrustedaccessrolebinding +#> +function Remove-AzAksTrustedAccessRoleBinding { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityManagedCluster', Mandatory)] + [Alias('TrustedAccessRoleBindingName')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of trusted access role binding. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityManagedCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${ManagedClusterInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Aks.private\Remove-AzAksTrustedAccessRoleBinding_Delete'; + DeleteViaIdentity = 'Az.Aks.private\Remove-AzAksTrustedAccessRoleBinding_DeleteViaIdentity'; + DeleteViaIdentityManagedCluster = 'Az.Aks.private\Remove-AzAksTrustedAccessRoleBinding_DeleteViaIdentityManagedCluster'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/generated/Aks/Aks.Autorest/exports/Start-AzAksCluster.ps1 b/generated/Aks/Aks.Autorest/exports/Start-AzAksCluster.ps1 index 31434aeab3cd..aeb6482d58d5 100644 --- a/generated/Aks/Aks.Autorest/exports/Start-AzAksCluster.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Start-AzAksCluster.ps1 @@ -38,12 +38,15 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link https://learn.microsoft.com/powershell/module/az.aks/start-azakscluster #> @@ -70,6 +73,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='StartViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/Aks/Aks.Autorest/exports/Start-AzAksManagedClusterCommand.ps1 b/generated/Aks/Aks.Autorest/exports/Start-AzAksManagedClusterCommand.ps1 index 9282b0dc4abe..fc9face6ad73 100644 --- a/generated/Aks/Aks.Autorest/exports/Start-AzAksManagedClusterCommand.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Start-AzAksManagedClusterCommand.ps1 @@ -43,12 +43,15 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link https://learn.microsoft.com/powershell/module/az.aks/start-azaksmanagedclustercommand #> @@ -80,6 +83,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='RunViaIdentityExpanded', Mandatory, ValueFromPipeline)] diff --git a/generated/Aks/Aks.Autorest/exports/Stop-AzAksCluster.ps1 b/generated/Aks/Aks.Autorest/exports/Stop-AzAksCluster.ps1 index 1e645703283f..7b8be3470cdd 100644 --- a/generated/Aks/Aks.Autorest/exports/Stop-AzAksCluster.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Stop-AzAksCluster.ps1 @@ -44,12 +44,15 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. .Link https://learn.microsoft.com/powershell/module/az.aks/stop-azakscluster #> @@ -76,6 +79,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='StopViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/Aks/Aks.Autorest/exports/Update-AzAksMaintenanceConfiguration.ps1 b/generated/Aks/Aks.Autorest/exports/Update-AzAksMaintenanceConfiguration.ps1 index 05273db88f7d..7df3aa840484 100644 --- a/generated/Aks/Aks.Autorest/exports/Update-AzAksMaintenanceConfiguration.ps1 +++ b/generated/Aks/Aks.Autorest/exports/Update-AzAksMaintenanceConfiguration.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -update a maintenance configuration in the specified managed cluster. +Update a maintenance configuration in the specified managed cluster. .Description -update a maintenance configuration in the specified managed cluster. +Update a maintenance configuration in the specified managed cluster. .Example $TimeSpan = New-AzAksTimeSpanObject -Start (Get-Date -Year 2023 -Month 3 -Day 2) -End (Get-Date -Year 2023 -Month 3 -Day 3) $TimeInWeek = New-AzAksTimeInWeekObject -Day Sunday -HourSlot 2,3 @@ -38,20 +38,27 @@ INPUTOBJECT : Identity Parameter [CommandId ]: Id of the command. [ConfigName ]: The name of the maintenance configuration. [Id ]: Resource identity path - [Location ]: The name of Azure region. + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ResourceName ]: The name of the managed cluster resource. [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: The ID of the target subscription. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. + +MAINTENANCEWINDOWNOTALLOWEDDATE : Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. + End : The end date of the date span. + Start : The start date of the date span. NOTALLOWEDTIME : Time slots on which upgrade is not allowed. [End ]: The end of a time span [Start ]: The start of a time span -TIMEINWEEK : If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. +TIMEINWEEK : 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. [Day ]: The day of the week. - [HourSlot >]: Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + [HourSlot >]: A list of hours in the day used to identify a time range. Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. .Link https://learn.microsoft.com/powershell/module/az.aks/update-azaksmaintenanceconfiguration #> @@ -83,6 +90,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] @@ -91,6 +99,64 @@ param( # Identity Parameter ${InputObject}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # The date of the month. + ${AbsoluteMonthlyDayOfMonth}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of months between each set of occurrences. + ${AbsoluteMonthlyIntervalMonth}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of days between each set of occurrences. + ${DailyIntervalDay}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Length of maintenance window range from 4 to 24 hours. + ${MaintenanceWindowDurationHour}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan[]] + # Date ranges on which upgrade is not allowed. + # 'utcOffset' applies to this field. + # For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. + ${MaintenanceWindowNotAllowedDate}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.DateTime] + # The date the maintenance window activates. + # If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. + # If not specified, the maintenance window will be active right away. + ${MaintenanceWindowStartDate}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The start time of the maintenance window. + # Accepted values are from '00:00' to '23:59'. + # 'utcOffset' applies to this field. + # For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + ${MaintenanceWindowStartTime}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The UTC offset in format +/-HH:mm. + # For example, '+05:30' for IST and '-07:00' for PST. + # If not specified, the default is '+00:00'. + ${MaintenanceWindowUtcOffset}, + [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] @@ -98,13 +164,48 @@ param( # Time slots on which upgrade is not allowed. ${NotAllowedTime}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Specifies on which day of the week the maintenance occurs. + ${RelativeMonthlyDayOfWeek}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of months between each set of occurrences. + ${RelativeMonthlyIntervalMonth}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The week index. + # Specifies on which week of the month the dayOfWeek applies. + ${RelativeMonthlyWeekIndex}, + [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek[]] + # 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. ${TimeInWeek}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # Specifies on which day of the week the maintenance occurs. + ${WeeklyDayOfWeek}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32] + # Specifies the number of weeks between each set of occurrences. + ${WeeklyIntervalWeek}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/generated/Aks/Aks.Autorest/exports/Update-AzAksTrustedAccessRoleBinding.ps1 b/generated/Aks/Aks.Autorest/exports/Update-AzAksTrustedAccessRoleBinding.ps1 new file mode 100644 index 000000000000..9242b411229f --- /dev/null +++ b/generated/Aks/Aks.Autorest/exports/Update-AzAksTrustedAccessRoleBinding.ps1 @@ -0,0 +1,260 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a trusted access role binding +.Description +Update a trusted access role binding +.Example +Update-AzAksTrustedAccessRoleBinding -Name testBinding -ResourceGroupName AKS_TEST_RG -ResourceName AKS_Test_Cluster -Role 'Microsoft.MachineLearningServices/workspaces/inference-v1' + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AgentPoolName ]: The name of the agent pool. + [CommandId ]: Id of the command. + [ConfigName ]: The name of the maintenance configuration. + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [MachineName ]: host name of the machine + [Mode ]: The mode of the mesh. + [PrivateEndpointConnectionName ]: The name of the private endpoint connection. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the managed cluster resource. + [RoleName ]: The name of the role for managed cluster accessProfile resource. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TrustedAccessRoleBindingName ]: The name of trusted access role binding. +.Link +https://learn.microsoft.com/powershell/module/az.aks/update-azakstrustedaccessrolebinding +#> +function Update-AzAksTrustedAccessRoleBinding { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('TrustedAccessRoleBindingName')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of trusted access role binding. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String[]] + # A list of roles to bind, each item is a resource type qualified role name. + # For example: 'Microsoft.MachineLearningServices/workspaces/reader'. + ${Role}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The ARM resource ID of source resource that trusted access is configured for. + ${SourceResourceId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Aks.private\Update-AzAksTrustedAccessRoleBinding_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Aks.private\Update-AzAksTrustedAccessRoleBinding_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/generated/Aks/Aks.Autorest/generate-info.json b/generated/Aks/Aks.Autorest/generate-info.json index 82e79c7f224b..b7172d37d38c 100644 --- a/generated/Aks/Aks.Autorest/generate-info.json +++ b/generated/Aks/Aks.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "8e125419-bbed-45dc-a4dc-934a7823b7e7" + "generate_Id": "e74c13e0-6230-4cd6-b053-899caeabf7fd" } diff --git a/generated/Aks/Aks.Autorest/generated/api/Aks.cs b/generated/Aks/Aks.Autorest/generated/api/Aks.cs index 38e5b7cc5461..eeaef8637989 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Aks.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Aks.cs @@ -19,11 +19,12 @@ public partial class Aks /// 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 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. /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -31,9 +32,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsAbortLatestOperation(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsAbortLatestOperation(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -61,7 +62,7 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AgentPoolsAbortLatestOperation_Call (request, onNoContent,onDefault,eventListener,sender); + await this.AgentPoolsAbortLatestOperation_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } @@ -72,6 +73,7 @@ public partial class Aks /// /// /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -79,9 +81,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsAbortLatestOperationViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsAbortLatestOperationViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -122,13 +124,14 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AgentPoolsAbortLatestOperation_Call (request, onNoContent,onDefault,eventListener,sender); + await this.AgentPoolsAbortLatestOperation_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -136,7 +139,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AgentPoolsAbortLatestOperation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AgentPoolsAbortLatestOperation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -245,6 +248,12 @@ public partial class Aks switch ( _response.StatusCode ) { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } case global::System.Net.HttpStatusCode.NoContent: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -254,7 +263,7 @@ public partial class Aks default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -273,7 +282,7 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// - /// The ID of the target 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 name of the agent pool. @@ -286,7 +295,7 @@ public partial class Aks using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -302,10 +311,12 @@ public partial class Aks } /// update an agent pool in the specified managed cluster. - /// The ID of the target 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 name of the agent pool. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. /// The agent pool to create or update. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -316,9 +327,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPool body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPool body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -343,6 +354,16 @@ public partial class Aks var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); @@ -355,6 +376,8 @@ public partial class Aks /// update an agent pool in the specified managed cluster. /// + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. /// The agent pool to create or update. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -365,9 +388,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPool body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPool body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -405,6 +428,16 @@ public partial class Aks var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); @@ -417,6 +450,8 @@ public partial class Aks /// update an agent pool in the specified managed cluster. /// + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. /// The agent pool to create or update. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. @@ -425,9 +460,9 @@ public partial class Aks /// A that will /// be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPool body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPool body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -465,6 +500,16 @@ public partial class Aks var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); @@ -476,10 +521,12 @@ public partial class Aks } /// update an agent pool in the specified managed cluster. - /// The ID of the target 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 name of the agent pool. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. /// Json string supplied to the AgentPoolsCreateOrUpdate operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -489,9 +536,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, string ifMatch, string ifNoneMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -516,6 +563,16 @@ public partial class Aks var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); @@ -527,10 +584,12 @@ public partial class Aks } /// update an agent pool in the specified managed cluster. - /// The ID of the target 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 name of the agent pool. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. /// Json string supplied to the AgentPoolsCreateOrUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. @@ -538,9 +597,9 @@ public partial class Aks /// A that will /// be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, string ifMatch, string ifNoneMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -565,6 +624,16 @@ public partial class Aks var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // set body content request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); @@ -576,10 +645,12 @@ public partial class Aks } /// update an agent pool in the specified managed cluster. - /// The ID of the target 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 name of the agent pool. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. /// The agent pool to create or update. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. @@ -588,9 +659,9 @@ public partial class Aks /// A that will /// be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPool body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPool body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -615,6 +686,16 @@ public partial class Aks var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); @@ -753,14 +834,14 @@ public partial class Aks default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -790,7 +871,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -910,7 +991,7 @@ public partial class Aks default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -929,21 +1010,23 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but you will get /// validation events back. /// - /// The ID of the target 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 name of the agent pool. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. /// The agent pool to create or update. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPool body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPool body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -952,16 +1035,24 @@ public partial class Aks await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); await eventListener.AssertNotNull(nameof(agentPoolName),agentPoolName); + await eventListener.AssertMinimumLength(nameof(agentPoolName),agentPoolName,1); + await eventListener.AssertMaximumLength(nameof(agentPoolName),agentPoolName,12); + await eventListener.AssertRegEx(nameof(agentPoolName), agentPoolName, @"^[a-z][a-z0-9]{0,11}$"); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); + await eventListener.AssertNotNull(nameof(ifNoneMatch),ifNoneMatch); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } /// Deletes an agent pool in the specified managed cluster. - /// The ID of the target 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 name of the agent pool. + /// The request should only proceed if an entity matches this string. + /// ignore-pod-disruption-budget=true to delete those pods on a node without considering + /// Pod Disruption Budget /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -971,9 +1062,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsDelete(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsDelete(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, string ifMatch, bool? ignorePodDisruptionBudget, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -989,6 +1080,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(agentPoolName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == ignorePodDisruptionBudget ? global::System.String.Empty : "ignore-pod-disruption-budget=" + global::System.Uri.EscapeDataString(ignorePodDisruptionBudget.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -998,26 +1091,88 @@ public partial class Aks var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.AgentPoolsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } - /// Deletes an agent pool in the specified managed cluster. + /// Deletes specific machines in 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. + /// The name of the agent pool. + /// A list of machines from the agent pool to be deleted. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AgentPoolsDeleteMachines(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter body, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/agentPools/" + + global::System.Uri.EscapeDataString(agentPoolName) + + "/deleteMachines" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AgentPoolsDeleteMachines_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Deletes specific machines in an agent pool. /// + /// A list of machines from the agent pool to be deleted. /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsDeleteMachinesViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter body, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1044,6 +1199,7 @@ public partial class Aks + resourceName + "/agentPools/" + agentPoolName + + "/deleteMachines" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1052,16 +1208,73 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AgentPoolsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + await this.AgentPoolsDeleteMachines_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Deletes specific machines in 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. + /// The name of the agent pool. + /// Json string supplied to the AgentPoolsDeleteMachines operation + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AgentPoolsDeleteMachinesViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, global::System.String jsonString, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/agentPools/" + + global::System.Uri.EscapeDataString(agentPoolName) + + "/deleteMachines" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AgentPoolsDeleteMachines_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). @@ -1072,7 +1285,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AgentPoolsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AgentPoolsDeleteMachines_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1199,7 +1412,7 @@ public partial class Aks default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1215,23 +1428,24 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// - /// The ID of the target 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 name of the agent pool. + /// A list of machines from the agent pool to be deleted. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AgentPoolsDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task AgentPoolsDeleteMachines_Validate(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -1240,14 +1454,20 @@ public partial class Aks await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); await eventListener.AssertNotNull(nameof(agentPoolName),agentPoolName); + await eventListener.AssertMinimumLength(nameof(agentPoolName),agentPoolName,1); + await eventListener.AssertMaximumLength(nameof(agentPoolName),agentPoolName,12); + await eventListener.AssertRegEx(nameof(agentPoolName), agentPoolName, @"^[a-z][a-z0-9]{0,11}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Gets the specified managed cluster agent pool. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// The name of the agent pool. + /// Deletes an agent pool in the specified managed cluster. + /// + /// The request should only proceed if an entity matches this string. + /// ignore-pod-disruption-budget=true to delete those pods on a node without considering + /// Pod Disruption Budget + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1256,46 +1476,63 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsGet(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsDeleteViaIdentity(global::System.String viaIdentity, string ifMatch, bool? ignorePodDisruptionBudget, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/agentPools/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + var agentPoolName = _match.Groups["agentPoolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) + + resourceName + "/agentPools/" - + global::System.Uri.EscapeDataString(agentPoolName) + + agentPoolName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == ignorePodDisruptionBudget ? global::System.String.Empty : "ignore-pod-disruption-budget=" + global::System.Uri.EscapeDataString(ignorePodDisruptionBudget.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AgentPoolsGet_Call (request, onOk,onDefault,eventListener,sender); + await this.AgentPoolsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } - /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1304,35 +1541,274 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsGetAvailableAgentPoolVersions(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AgentPoolsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; - // Constant Parameters using( NoSynchronizationContext ) { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/availableAgentPoolVersions" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.AgentPoolsGetAvailableAgentPoolVersions_Call (request, onOk,onDefault,eventListener,sender); + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// 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. + /// ignore-pod-disruption-budget=true to delete those pods on a node without considering + /// Pod Disruption Budget + /// The request should only proceed if an entity matches this string. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AgentPoolsDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, bool? ignorePodDisruptionBudget, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(agentPoolName),agentPoolName); + await eventListener.AssertMinimumLength(nameof(agentPoolName),agentPoolName,1); + await eventListener.AssertMaximumLength(nameof(agentPoolName),agentPoolName,12); + await eventListener.AssertRegEx(nameof(agentPoolName), agentPoolName, @"^[a-z][a-z0-9]{0,11}$"); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); + } + } + + /// Gets the specified managed cluster 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. + /// The name of the agent pool. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AgentPoolsGet(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/agentPools/" + + global::System.Uri.EscapeDataString(agentPoolName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AgentPoolsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AgentPoolsGetAvailableAgentPoolVersions(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/availableAgentPoolVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AgentPoolsGetAvailableAgentPoolVersions_Call (request, onOk,onDefault,eventListener,sender); } } @@ -1349,9 +1825,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsGetAvailableAgentPoolVersionsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsGetAvailableAgentPoolVersionsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1406,7 +1882,7 @@ public partial class Aks /// public async global::System.Threading.Tasks.Task AgentPoolsGetAvailableAgentPoolVersionsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1452,7 +1928,7 @@ public partial class Aks /// 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 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. /// an instance that will receive events. @@ -1463,7 +1939,7 @@ public partial class Aks /// public async global::System.Threading.Tasks.Task AgentPoolsGetAvailableAgentPoolVersionsWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1528,14 +2004,14 @@ public partial class Aks default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -1567,7 +2043,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AgentPoolsGetAvailableAgentPoolVersions_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AgentPoolsGetAvailableAgentPoolVersions_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1592,7 +2068,7 @@ public partial class Aks default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1611,7 +2087,7 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but /// you will get validation events back. /// - /// The ID of the target 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. /// an instance that will receive events. @@ -1623,7 +2099,7 @@ public partial class Aks using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -1635,7 +2111,7 @@ public partial class Aks } /// Gets the upgrade profile for an agent pool. - /// The ID of the target 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 name of the agent pool. @@ -1647,9 +2123,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsGetUpgradeProfile(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsGetUpgradeProfile(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1691,9 +2167,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsGetUpgradeProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsGetUpgradeProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1748,7 +2224,7 @@ public partial class Aks /// public async global::System.Threading.Tasks.Task AgentPoolsGetUpgradeProfileViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1794,7 +2270,7 @@ public partial class Aks } /// Gets the upgrade profile for an agent pool. - /// The ID of the target 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 name of the agent pool. @@ -1806,7 +2282,7 @@ public partial class Aks /// public async global::System.Threading.Tasks.Task AgentPoolsGetUpgradeProfileWithResult(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1873,14 +2349,14 @@ public partial class Aks default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -1910,7 +2386,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AgentPoolsGetUpgradeProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AgentPoolsGetUpgradeProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1935,7 +2411,7 @@ public partial class Aks default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1954,7 +2430,7 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// - /// The ID of the target 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 name of the agent pool. @@ -1967,7 +2443,7 @@ public partial class Aks using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -1992,9 +2468,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2048,7 +2524,7 @@ public partial class Aks /// public async global::System.Threading.Tasks.Task AgentPoolsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2093,7 +2569,7 @@ public partial class Aks } /// Gets the specified managed cluster agent pool. - /// The ID of the target 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 name of the agent pool. @@ -2105,7 +2581,7 @@ public partial class Aks /// public async global::System.Threading.Tasks.Task AgentPoolsGetWithResult(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2169,14 +2645,14 @@ public partial class Aks default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -2206,7 +2682,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AgentPoolsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AgentPoolsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2231,7 +2707,7 @@ public partial class Aks default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2250,7 +2726,7 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// The ID of the target 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 name of the agent pool. @@ -2263,7 +2739,7 @@ public partial class Aks using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -2279,7 +2755,7 @@ public partial class Aks } /// Gets a list of agent pools in the specified managed cluster. - /// The ID of the target 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. /// a delegate that is called when the remote service returns 200 (OK). @@ -2290,9 +2766,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsList(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsList(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2332,9 +2808,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2386,7 +2862,7 @@ public partial class Aks /// public async global::System.Threading.Tasks.Task AgentPoolsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2429,7 +2905,7 @@ public partial class Aks } /// Gets a list of agent pools in the specified managed cluster. - /// The ID of the target 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. /// an instance that will receive events. @@ -2440,7 +2916,7 @@ public partial class Aks /// public async global::System.Threading.Tasks.Task AgentPoolsListWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2503,14 +2979,14 @@ public partial class Aks default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -2540,7 +3016,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AgentPoolsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AgentPoolsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2565,7 +3041,7 @@ public partial class Aks default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2584,7 +3060,7 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// The ID of the target 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. /// an instance that will receive events. @@ -2596,7 +3072,7 @@ public partial class Aks using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -2611,7 +3087,7 @@ public partial class Aks /// Upgrading the node image version of an agent pool applies the newest OS and runtime upgrade to the nodes. AKS provides /// one new image per week with the latest upgrade For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade /// - /// The ID of the target 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 name of the agent pool. @@ -2623,9 +3099,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsUpgradeNodeImageVersion(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsUpgradeNodeImageVersion(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2670,9 +3146,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentPoolsUpgradeNodeImageVersionViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentPoolsUpgradeNodeImageVersionViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2727,7 +3203,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AgentPoolsUpgradeNodeImageVersion_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AgentPoolsUpgradeNodeImageVersion_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2845,7 +3321,7 @@ public partial class Aks default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2864,7 +3340,7 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but you /// will get validation events back. /// - /// The ID of the target 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 name of the agent pool. @@ -2877,7 +3353,7 @@ public partial class Aks using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -2896,7 +3372,7 @@ public partial class Aks /// Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator /// including version, available upgrades and whether that version or upgrades are in preview. /// - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of a supported Azure region. /// resource type for which the list of orchestrators needs to be returned /// a delegate that is called when the remote service returns 200 (OK). @@ -3051,7 +3527,7 @@ public partial class Aks /// Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator /// including version, available upgrades and whether that version or upgrades are in preview. /// - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of a supported Azure region. /// resource type for which the list of orchestrators needs to be returned /// an instance that will receive events. @@ -3190,7 +3666,7 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but you /// will get validation events back. /// - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of a supported Azure region. /// resource type for which the list of orchestrators needs to be returned /// an instance that will receive events. @@ -3202,30 +3678,29 @@ public partial class Aks using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(location),location); await eventListener.AssertNotNull(nameof(resourceType),resourceType); } } - /// update a maintenance configuration in the specified managed cluster. - /// The ID of the target subscription. + /// Get a specific machine in the specified 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. - /// The name of the maintenance configuration. - /// The maintenance configuration to create or update. + /// The name of the agent pool. + /// host name of the machine /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, string configName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task MachinesGet(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, string machineName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3237,8 +3712,10 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/maintenanceConfigurations/" - + global::System.Uri.EscapeDataString(configName) + + "/agentPools/" + + global::System.Uri.EscapeDataString(agentPoolName) + + "/machines/" + + global::System.Uri.EscapeDataString(machineName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3247,50 +3724,45 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.MaintenanceConfigurationsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.MachinesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// update a maintenance configuration in the specified managed cluster. + /// Get a specific machine in the specified agent pool. /// - /// The maintenance configuration to create or update. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task MachinesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/maintenanceConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/agentPools/(?[^/]+)/machines/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; - var configName = _match.Groups["configName"].Value; + var agentPoolName = _match.Groups["agentPoolName"].Value; + var machineName = _match.Groups["machineName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3299,8 +3771,10 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/maintenanceConfigurations/" - + configName + + "/agentPools/" + + agentPoolName + + "/machines/" + + machineName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3309,48 +3783,43 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.MaintenanceConfigurationsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.MachinesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// update a maintenance configuration in the specified managed cluster. + /// Get a specific machine in the specified agent pool. /// - /// The maintenance configuration to create or update. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will + /// be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task MachinesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/maintenanceConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/agentPools/(?[^/]+)/machines/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; - var configName = _match.Groups["configName"].Value; + var agentPoolName = _match.Groups["agentPoolName"].Value; + var machineName = _match.Groups["machineName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3359,108 +3828,10 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/maintenanceConfigurations/" - + configName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.MaintenanceConfigurationsCreateOrUpdateWithResult_Call (request, eventListener,sender); - } - } - - /// update a maintenance configuration in the specified managed cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// The name of the maintenance configuration. - /// Json string supplied to the MaintenanceConfigurationsCreateOrUpdate operation - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, string configName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/maintenanceConfigurations/" - + global::System.Uri.EscapeDataString(configName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.MaintenanceConfigurationsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// update a maintenance configuration in the specified managed cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// The name of the maintenance configuration. - /// Json string supplied to the MaintenanceConfigurationsCreateOrUpdate operation - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, string configName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/maintenanceConfigurations/" - + global::System.Uri.EscapeDataString(configName) + + "/agentPools/" + + agentPoolName + + "/machines/" + + machineName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3469,35 +3840,30 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.MaintenanceConfigurationsCreateOrUpdateWithResult_Call (request, eventListener,sender); + return await this.MachinesGetWithResult_Call (request, eventListener,sender); } } - /// update a maintenance configuration in the specified managed cluster. - /// The ID of the target subscription. + /// Get a specific machine in the specified 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. - /// The name of the maintenance configuration. - /// The maintenance configuration to create or update. + /// The name of the agent pool. + /// host name of the machine /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will + /// be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string resourceName, string configName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task MachinesGetWithResult(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, string machineName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3509,8 +3875,10 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/maintenanceConfigurations/" - + global::System.Uri.EscapeDataString(configName) + + "/agentPools/" + + global::System.Uri.EscapeDataString(agentPoolName) + + "/machines/" + + global::System.Uri.EscapeDataString(machineName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3519,30 +3887,24 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.MaintenanceConfigurationsCreateOrUpdateWithResult_Call (request, eventListener,sender); + return await this.MachinesGetWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will + /// be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MachinesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3561,20 +3923,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Machine.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -3594,9 +3956,7 @@ public partial class Aks } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -3606,7 +3966,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MachinesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3625,13 +3985,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Machine.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3647,24 +4007,24 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but - /// you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. /// - /// The ID of the target 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 name of the maintenance configuration. - /// The maintenance configuration to create or update. + /// The name of the agent pool. + /// host name of the machine /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, string configName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MachinesGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, string machineName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -3672,19 +4032,21 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(configName),configName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(agentPoolName),agentPoolName); + await eventListener.AssertMinimumLength(nameof(agentPoolName),agentPoolName,1); + await eventListener.AssertMaximumLength(nameof(agentPoolName),agentPoolName,12); + await eventListener.AssertRegEx(nameof(agentPoolName), agentPoolName, @"^[a-z][a-z0-9]{0,11}$"); + await eventListener.AssertNotNull(nameof(machineName),machineName); + await eventListener.AssertRegEx(nameof(machineName), machineName, @"^[a-zA-Z0-9][-_a-zA-Z0-9]{0,39}$"); } } - /// Deletes a maintenance configuration. - /// The ID of the target subscription. + /// Gets a list of machines in the specified 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. - /// The name of the maintenance configuration. + /// The name of the agent pool. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -3692,9 +4054,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsDelete(string subscriptionId, string resourceGroupName, string resourceName, string configName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MachinesList(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3706,8 +4068,9 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/maintenanceConfigurations/" - + global::System.Uri.EscapeDataString(configName) + + "/agentPools/" + + global::System.Uri.EscapeDataString(agentPoolName) + + "/machines" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3716,19 +4079,18 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.MaintenanceConfigurationsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + await this.MachinesList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes a maintenance configuration. + /// Gets a list of machines in the specified agent pool. /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -3736,25 +4098,25 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MachinesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/maintenanceConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/agentPools/(?[^/]+)/machines$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; - var configName = _match.Groups["configName"].Value; + var agentPoolName = _match.Groups["agentPoolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3763,8 +4125,9 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/maintenanceConfigurations/" - + configName + + "/agentPools/" + + agentPoolName + + "/machines" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3773,271 +4136,84 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.MaintenanceConfigurationsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + await this.MachinesList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Gets a list of machines in the specified agent pool. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MachinesListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { + var apiVersion = @"2025-08-01"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/agentPools/(?[^/]+)/machines$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + var agentPoolName = _match.Groups["agentPoolName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/agentPools/" + + agentPoolName + + "/machines" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.MachinesListWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// - /// The ID of the target subscription. + /// Gets a list of machines in the specified 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. - /// The name of the maintenance configuration. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, string configName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(resourceName),resourceName); - await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); - await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); - await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(configName),configName); - } - } - - /// Gets the specified maintenance configuration of a managed cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// The name of the maintenance configuration. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsGet(string subscriptionId, string resourceGroupName, string resourceName, string configName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/maintenanceConfigurations/" - + global::System.Uri.EscapeDataString(configName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.MaintenanceConfigurationsGet_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// Gets the specified maintenance configuration of a managed cluster. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/maintenanceConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; - var configName = _match.Groups["configName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/maintenanceConfigurations/" - + configName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.MaintenanceConfigurationsGet_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// Gets the specified maintenance configuration of a managed cluster. - /// - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/maintenanceConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; - var configName = _match.Groups["configName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/maintenanceConfigurations/" - + configName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.MaintenanceConfigurationsGetWithResult_Call (request, eventListener,sender); - } - } - - /// Gets the specified maintenance configuration of a managed cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// The name of the maintenance configuration. + /// The name of the agent pool. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsGetWithResult(string subscriptionId, string resourceGroupName, string resourceName, string configName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MachinesListWithResult(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4049,8 +4225,9 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/maintenanceConfigurations/" - + global::System.Uri.EscapeDataString(configName) + + "/agentPools/" + + global::System.Uri.EscapeDataString(agentPoolName) + + "/machines" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4064,21 +4241,19 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.MaintenanceConfigurationsGetWithResult_Call (request, eventListener,sender); + return await this.MachinesListWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MachinesListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4097,20 +4272,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -4130,7 +4305,7 @@ public partial class Aks } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -4140,7 +4315,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MachinesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4159,13 +4334,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4181,23 +4356,23 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// The ID of the target 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 name of the maintenance configuration. + /// The name of the agent pool. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, string configName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MachinesList_Validate(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -4205,25 +4380,32 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(configName),configName); + await eventListener.AssertNotNull(nameof(agentPoolName),agentPoolName); + await eventListener.AssertMinimumLength(nameof(agentPoolName),agentPoolName,1); + await eventListener.AssertMaximumLength(nameof(agentPoolName),agentPoolName,12); + await eventListener.AssertRegEx(nameof(agentPoolName), agentPoolName, @"^[a-z][a-z0-9]{0,11}$"); } } - /// Gets a list of maintenance configurations in the specified managed cluster. - /// The ID of the target subscription. + /// update a maintenance configuration in the specified 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 name of the maintenance configuration. + /// The maintenance configuration to create or update. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsListByManagedCluster(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, string configName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4235,7 +4417,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/maintenanceConfigurations" + + "/maintenanceConfigurations/" + + global::System.Uri.EscapeDataString(configName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4244,43 +4427,51 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.MaintenanceConfigurationsListByManagedCluster_Call (request, onOk,onDefault,eventListener,sender); + await this.MaintenanceConfigurationsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); } } - /// Gets a list of maintenance configurations in the specified managed cluster. + /// update a maintenance configuration in the specified managed cluster. /// + /// The maintenance configuration to create or update. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsListByManagedClusterViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/maintenanceConfigurations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/maintenanceConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var configName = _match.Groups["configName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4289,7 +4480,8 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/maintenanceConfigurations" + + "/maintenanceConfigurations/" + + configName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4298,41 +4490,48 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.MaintenanceConfigurationsListByManagedCluster_Call (request, onOk,onDefault,eventListener,sender); + await this.MaintenanceConfigurationsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); } } - /// Gets a list of maintenance configurations in the specified managed cluster. + /// update a maintenance configuration in the specified managed cluster. /// + /// The maintenance configuration to create or update. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsListByManagedClusterViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/maintenanceConfigurations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/maintenanceConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var configName = _match.Groups["configName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4341,8 +4540,9 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/maintenanceConfigurations" - + "?" + + "/maintenanceConfigurations/" + + configName + + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4350,28 +4550,86 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.MaintenanceConfigurationsListByManagedClusterWithResult_Call (request, eventListener,sender); + return await this.MaintenanceConfigurationsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Gets a list of maintenance configurations in the specified managed cluster. - /// The ID of the target subscription. + /// update a maintenance configuration in the specified 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 name of the maintenance configuration. + /// Json string supplied to the MaintenanceConfigurationsCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, string configName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/maintenanceConfigurations/" + + global::System.Uri.EscapeDataString(configName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MaintenanceConfigurationsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// update a maintenance configuration in the specified 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 name of the maintenance configuration. + /// Json string supplied to the MaintenanceConfigurationsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MaintenanceConfigurationsListByManagedClusterWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, string configName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4383,7 +4641,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/maintenanceConfigurations" + + "/maintenanceConfigurations/" + + global::System.Uri.EscapeDataString(configName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4392,26 +4651,80 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.MaintenanceConfigurationsListByManagedClusterWithResult_Call (request, eventListener,sender); + return await this.MaintenanceConfigurationsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update a maintenance configuration in the specified 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 name of the maintenance configuration. + /// The maintenance configuration to create or update. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string resourceName, string configName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/maintenanceConfigurations/" + + global::System.Uri.EscapeDataString(configName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.MaintenanceConfigurationsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsListByManagedClusterWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4430,20 +4743,26 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfigurationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -4464,10 +4783,11 @@ public partial class Aks } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -4475,7 +4795,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsListByManagedCluster_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4494,13 +4814,19 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfigurationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4516,22 +4842,24 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. /// - /// The ID of the target 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 name of the maintenance configuration. + /// The maintenance configuration to create or update. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsListByManagedCluster_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, string configName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -4539,17 +4867,18 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(configName),configName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// 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. + /// Deletes a maintenance configuration. + /// 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 maintenance configuration. + /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -4558,9 +4887,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersAbortLatestOperation(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsDelete(string subscriptionId, string resourceGroupName, string resourceName, string configName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4570,9 +4899,10 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedclusters/" + + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/abort" + + "/maintenanceConfigurations/" + + global::System.Uri.EscapeDataString(configName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4581,21 +4911,18 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersAbortLatestOperation_Call (request, onNoContent,onDefault,eventListener,sender); + await this.MaintenanceConfigurationsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// - /// 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. - /// + /// Deletes a maintenance configuration. /// + /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -4604,33 +4931,35 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersAbortLatestOperationViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedclusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/maintenanceConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var configName = _match.Groups["configName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ContainerService/managedclusters/" + + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/abort" + + "/maintenanceConfigurations/" + + configName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4639,19 +4968,18 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersAbortLatestOperation_Call (request, onNoContent,onDefault,eventListener,sender); + await this.MaintenanceConfigurationsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -4660,156 +4988,70 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersAbortLatestOperation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// The ID of the target 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 name of the maintenance configuration. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersAbortLatestOperation_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, string configName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -4817,26 +5059,26 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(configName),configName); } } - /// update a managed cluster. - /// The ID of the target subscription. + /// Gets the specified maintenance configuration 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 managed cluster to create or update. + /// The name of the maintenance configuration. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsGet(string subscriptionId, string resourceGroupName, string resourceName, string configName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4848,6 +5090,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) + + "/maintenanceConfigurations/" + + global::System.Uri.EscapeDataString(configName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4856,49 +5100,44 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.MaintenanceConfigurationsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// update a managed cluster. + /// Gets the specified maintenance configuration of a managed cluster. /// - /// The managed cluster to create or update. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/maintenanceConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var configName = _match.Groups["configName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4907,6 +5146,8 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName + + "/maintenanceConfigurations/" + + configName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4915,47 +5156,42 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.MaintenanceConfigurationsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// update a managed cluster. + /// Gets the specified maintenance configuration of a managed cluster. /// - /// The managed cluster to create or update. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// - /// A that - /// will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedCluster body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/maintenanceConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var configName = _match.Groups["configName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4964,6 +5200,8 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName + + "/maintenanceConfigurations/" + + configName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4972,81 +5210,29 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.ManagedClustersCreateOrUpdateWithResult_Call (request, eventListener,sender); - } - } - - /// update a managed cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// Json string supplied to the ManagedClustersCreateOrUpdate operation - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + return await this.MaintenanceConfigurationsGetWithResult_Call (request, eventListener,sender); } } - /// update a managed cluster. - /// The ID of the target subscription. + /// Gets the specified maintenance configuration 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. - /// Json string supplied to the ManagedClustersCreateOrUpdate operation + /// The name of the maintenance configuration. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that - /// will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsGetWithResult(string subscriptionId, string resourceGroupName, string resourceName, string configName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5058,6 +5244,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) + + "/maintenanceConfigurations/" + + global::System.Uri.EscapeDataString(configName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5066,204 +5254,58 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersCreateOrUpdateWithResult_Call (request, eventListener,sender); + return await this.MaintenanceConfigurationsGetWithResult_Call (request, eventListener,sender); } } - /// update a managed cluster. - /// The ID of the target subscription. - /// 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. + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// - /// A that - /// will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedCluster body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; - // Constant Parameters using( NoSynchronizationContext ) { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.ManagedClustersCreateOrUpdateWithResult_Call (request, eventListener,sender); - } - } - - /// - /// Actual wire call for method. - /// - /// the prepared HttpRequestMessage to send. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that - /// will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - // declared final-state-via: default - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_originalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - break; - } - } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -5283,7 +5325,7 @@ public partial class Aks } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -5293,112 +5335,17 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: default - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_originalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -5407,13 +5354,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5429,23 +5376,23 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will + /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// - /// The ID of the target 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 managed cluster to create or update. + /// The name of the maintenance configuration. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedCluster body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, string configName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -5453,16 +5400,14 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(configName),configName); } } - /// Deletes a managed cluster. - /// The ID of the target subscription. + /// Gets a list of maintenance configurations in the specified 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. - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -5471,9 +5416,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersDelete(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsListByManagedCluster(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5485,6 +5430,7 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) + + "/maintenanceConfigurations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5493,18 +5439,17 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + await this.MaintenanceConfigurationsListByManagedCluster_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes a managed cluster. + /// Gets a list of maintenance configurations in the specified managed cluster. /// - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -5513,18 +5458,18 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsListByManagedClusterViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/maintenanceConfigurations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'"); } // replace URI parameters with values from identity @@ -5539,6 +5484,7 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName + + "/maintenanceConfigurations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5547,258 +5493,80 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + await this.MaintenanceConfigurationsListByManagedCluster_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Gets a list of maintenance configurations in the specified managed cluster. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsListByManagedClusterViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { + var apiVersion = @"2025-08-01"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_finalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/maintenanceConfigurations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'"); } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ManagedClustersDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(resourceName),resourceName); - await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); - await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); - await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - } - } - /// Gets a managed cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ManagedClustersGet(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) + + resourceName + + "/maintenanceConfigurations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ManagedClustersGet_Call (request, onOk,onDefault,eventListener,sender); + return await this.MaintenanceConfigurationsListByManagedClusterWithResult_Call (request, eventListener,sender); } } - /// - /// **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. + /// Gets a list of maintenance configurations in the specified 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 name of the role for managed cluster accessProfile resource. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersGetAccessProfile(string subscriptionId, string resourceGroupName, string resourceName, string roleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsListByManagedClusterWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5810,206 +5578,35 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/accessProfiles/" - + global::System.Uri.EscapeDataString(roleName) - + "/listCredential" + + "/maintenanceConfigurations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ManagedClustersGetAccessProfile_Call (request, onOk,onDefault,eventListener,sender); + return await this.MaintenanceConfigurationsListByManagedClusterWithResult_Call (request, eventListener,sender); } } /// - /// **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) - /// . + /// Actual wire call for method. /// - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ManagedClustersGetAccessProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/accessProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; - var roleName = _match.Groups["roleName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/accessProfiles/" - + roleName - + "/listCredential" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ManagedClustersGetAccessProfile_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// - /// **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) - /// . - /// - /// - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ManagedClustersGetAccessProfileViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/accessProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; - var roleName = _match.Groups["roleName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/accessProfiles/" - + roleName - + "/listCredential" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.ManagedClustersGetAccessProfileWithResult_Call (request, eventListener,sender); - } - } - - /// - /// **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 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. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ManagedClustersGetAccessProfileWithResult(string subscriptionId, string resourceGroupName, string resourceName, string roleName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/accessProfiles/" - + global::System.Uri.EscapeDataString(roleName) - + "/listCredential" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.ManagedClustersGetAccessProfileWithResult_Call (request, eventListener,sender); - } - } - - /// - /// Actual wire call for method. - /// - /// the prepared HttpRequestMessage to send. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersGetAccessProfileWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsListByManagedClusterWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6028,20 +5625,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAccessProfile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfigurationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -6061,7 +5658,9 @@ public partial class Aks } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -6071,7 +5670,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersGetAccessProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsListByManagedCluster_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6090,13 +5689,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAccessProfile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfigurationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6112,23 +5711,22 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. /// - /// The ID of the target 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 name of the role for managed cluster accessProfile resource. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersGetAccessProfile_Validate(string subscriptionId, string resourceGroupName, string resourceName, string roleName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MaintenanceConfigurationsListByManagedCluster_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -6136,17 +5734,19 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(roleName),roleName); } } - /// Gets the results of a command which has been run on the Managed Cluster. - /// The ID of the target subscription. + /// + /// 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. - /// Id of the command. + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 202 (Accepted). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -6154,9 +5754,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersGetCommandResult(string subscriptionId, string resourceGroupName, string resourceName, string commandId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersAbortLatestOperation(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6166,10 +5766,9 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/managedclusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/commandResults/" - + global::System.Uri.EscapeDataString(commandId) + + "/abort" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6178,19 +5777,23 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersGetCommandResult_Call (request, onOk,onAccepted,onDefault,eventListener,sender); + await this.ManagedClustersAbortLatestOperation_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } - /// Gets the results of a command which has been run on the 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. + /// /// + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 202 (Accepted). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -6198,35 +5801,33 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersGetCommandResultViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersAbortLatestOperationViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/commandResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedclusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; - var commandId = _match.Groups["commandId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/managedclusters/" + resourceName - + "/commandResults/" - + commandId + + "/abort" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6235,202 +5836,132 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersGetCommandResult_Call (request, onOk,onAccepted,onDefault,eventListener,sender); + await this.ManagedClustersAbortLatestOperation_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } - /// Gets the results of a command which has been run on the Managed Cluster. - /// + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A - /// that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersGetCommandResultViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersAbortLatestOperation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/commandResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + global::System.Net.Http.HttpResponseMessage _response = null; + try { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'"); - } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; - var commandId = _match.Groups["commandId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/commandResults/" - + commandId - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.ManagedClustersGetCommandResultWithResult_Call (request, eventListener,sender); - } - } + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); - /// Gets the results of a command which has been run on the Managed Cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// Id of the command. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A - /// that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ManagedClustersGetCommandResultWithResult(string subscriptionId, string resourceGroupName, string resourceName, string commandId, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/commandResults/" - + global::System.Uri.EscapeDataString(commandId) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + // drop the old response + _response?.Dispose(); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.ManagedClustersGetCommandResultWithResult_Call (request, eventListener,sender); - } - } + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; - /// - /// Actual wire call for method. - /// - /// the prepared HttpRequestMessage to send. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A - /// that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ManagedClustersGetCommandResultWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RunCommandResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); - return await _result; - } - case global::System.Net.HttpStatusCode.Accepted: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); - } - default: + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); - // Error Response : default - var code = (await _result)?.Code; - var message = (await _result)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); - throw ex; - } - else - { - throw new global::System.Exception($"[{code}] : {message}"); - } + continue; } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 202 (Accepted). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ManagedClustersGetCommandResult_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -6439,19 +5970,19 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RunCommandResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); break; } - case global::System.Net.HttpStatusCode.Accepted: + case global::System.Net.HttpStatusCode.NoContent: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response); + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6467,23 +5998,22 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// - /// The ID of the target 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. - /// Id of the command. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersGetCommandResult_Validate(string subscriptionId, string resourceGroupName, string resourceName, string commandId, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ManagedClustersAbortLatestOperation_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -6491,25 +6021,28 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(commandId),commandId); } } - /// Gets supported OS options in the specified subscription. - /// The ID of the target subscription. - /// The name of Azure region. - /// The resource type for which the OS options needs to be returned + /// update 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 request should only proceed if no entity matches this string. + /// The managed cluster to create or update. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersGetOSOptions(string subscriptionId, string location, string resourceType, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6517,147 +6050,199 @@ public partial class Aks var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.ContainerService/locations/" - + global::System.Uri.EscapeDataString(location) - + "/osOptions/default" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(resourceType) ? global::System.String.Empty : "resource-type=" + global::System.Uri.EscapeDataString(resourceType)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersGetOSOptions_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets supported OS options in the specified subscription. + /// update a managed cluster. /// - /// The resource type for which the OS options needs to be returned + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// The managed cluster to create or update. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersGetOSOptionsViaIdentity(global::System.String viaIdentity, string resourceType, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/locations/(?[^/]+)/osOptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var location = _match.Groups["location"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.ContainerService/locations/" - + location - + "/osOptions/default" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(resourceType) ? global::System.String.Empty : "resource-type=" + global::System.Uri.EscapeDataString(resourceType)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersGetOSOptions_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets supported OS options in the specified subscription. + /// update a managed cluster. /// - /// The resource type for which the OS options needs to be returned + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// The managed cluster to create or update. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that + /// A that /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersGetOSOptionsViaIdentityWithResult(global::System.String viaIdentity, string resourceType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedCluster body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/locations/(?[^/]+)/osOptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var location = _match.Groups["location"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.ContainerService/locations/" - + location - + "/osOptions/default" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(resourceType) ? global::System.String.Empty : "resource-type=" + global::System.Uri.EscapeDataString(resourceType)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersGetOSOptionsWithResult_Call (request, eventListener,sender); + return await this.ManagedClustersCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Gets supported OS options in the specified subscription. - /// The ID of the target subscription. - /// The name of Azure region. - /// The resource type for which the OS options needs to be returned + /// update 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 request should only proceed if no entity matches this string. + /// Json string supplied to the ManagedClustersCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that - /// will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersGetOSOptionsWithResult(string subscriptionId, string location, string resourceType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch, string ifNoneMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6665,178 +6250,116 @@ public partial class Aks var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.ContainerService/locations/" - + global::System.Uri.EscapeDataString(location) - + "/osOptions/default" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(resourceType) ? global::System.String.Empty : "resource-type=" + global::System.Uri.EscapeDataString(resourceType)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.ManagedClustersGetOSOptionsWithResult_Call (request, eventListener,sender); - } - } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - /// - /// Actual wire call for method. - /// - /// the prepared HttpRequestMessage to send. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that - /// will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ManagedClustersGetOSOptionsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // add headers parameters + if (null != ifMatch) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionProfile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); - return await _result; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); - // Error Response : default - var code = (await _result)?.Code; - var message = (await _result)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); - throw ex; - } - else - { - throw new global::System.Exception($"[{code}] : {message}"); - } - } - } + request.Headers.Add("If-Match",ifMatch); } - finally + if (null != ifNoneMatch) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + request.Headers.Add("If-None-Match",ifNoneMatch); } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// update 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 request should only proceed if no entity matches this string. + /// Json string supplied to the ManagedClustersCreateOrUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersGetOSOptions_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch, string ifNoneMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { + var apiVersion = @"2025-08-01"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionProfile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); } - finally + if (null != ifNoneMatch) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + request.Headers.Add("If-None-Match",ifNoneMatch); } - } - } - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// - /// The ID of the target subscription. - /// The name of Azure region. - /// The resource type for which the OS options needs to be returned - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ManagedClustersGetOSOptions_Validate(string subscriptionId, string location, string resourceType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(location),location); - await eventListener.AssertMinimumLength(nameof(location),location,1); - await eventListener.AssertNotNull(nameof(resourceType),resourceType); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Gets the upgrade profile of a managed cluster. - /// The ID of the target subscription. + /// update 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. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// The managed cluster to create or update. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersGetUpgradeProfile(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedCluster body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6848,193 +6371,153 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/upgradeProfiles/default" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ManagedClustersGetUpgradeProfile_Call (request, onOk,onDefault,eventListener,sender); + return await this.ManagedClustersCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Gets the upgrade profile of a managed cluster. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersGetUpgradeProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/upgradeProfiles/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + global::System.Net.Http.HttpResponseMessage _response = null; + try { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/upgradeProfiles/default" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ManagedClustersGetUpgradeProfile_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// Gets the upgrade profile of a managed cluster. - /// - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ManagedClustersGetUpgradeProfileViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/upgradeProfiles/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'"); - } + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/upgradeProfiles/default" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + // drop the old response + _response?.Dispose(); - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.ManagedClustersGetUpgradeProfileWithResult_Call (request, eventListener,sender); - } - } + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } - /// Gets the upgrade profile of a managed cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ManagedClustersGetUpgradeProfileWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/upgradeProfiles/default" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.ManagedClustersGetUpgradeProfileWithResult_Call (request, eventListener,sender); - } - } + // drop the old response + _response?.Dispose(); - /// - /// Actual wire call for method. - /// - /// the prepared HttpRequestMessage to send. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ManagedClustersGetUpgradeProfileWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -7043,20 +6526,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterUpgradeProfile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -7076,7 +6559,7 @@ public partial class Aks } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -7086,32 +6569,127 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersGetUpgradeProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterUpgradeProfile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7127,22 +6705,25 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// The ID of the target 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 request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// The managed cluster to create or update. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersGetUpgradeProfile_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ManagedClustersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedCluster body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -7150,11 +6731,19 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); + await eventListener.AssertNotNull(nameof(ifNoneMatch),ifNoneMatch); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// 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. + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -7163,32 +6752,20 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersDelete(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName + + global::System.Uri.EscapeDataString(resourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7197,26 +6774,36 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersGet_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } - /// Gets a managed cluster. + /// Deletes a managed cluster. /// + /// The request should only proceed if an entity matches this string. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that - /// will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersDeleteViaIdentity(global::System.String viaIdentity, string ifMatch, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7244,141 +6831,143 @@ public partial class Aks + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.ManagedClustersGetWithResult_Call (request, eventListener,sender); - } - } - - /// Gets a managed cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that - /// will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ManagedClustersGetWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - return await this.ManagedClustersGetWithResult_Call (request, eventListener,sender); + await this.ManagedClustersDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that - /// will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); - return await _result; + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); - // Error Response : default - var code = (await _result)?.Code; - var message = (await _result)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); - throw ex; - } - else - { - throw new global::System.Exception($"[{code}] : {message}"); - } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ManagedClustersGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -7387,13 +6976,19 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7409,22 +7004,23 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// The ID of the target 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 request should only proceed if an entity matches this string. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ManagedClustersDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -7432,11 +7028,14 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); } } - /// Gets a list of managed clusters in the specified subscription. - /// The ID of the target subscription. + /// 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. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -7445,9 +7044,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGet(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7455,7 +7054,10 @@ public partial class Aks var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.ContainerService/managedClusters" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7469,13 +7071,19 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersList_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists managed clusters in the specified subscription and resource group. - /// The ID of the target subscription. + /// + /// **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. + /// The name of the role for managed cluster accessProfile resource. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -7484,9 +7092,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetAccessProfile(string subscriptionId, string resourceGroupName, string resourceName, string roleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7496,7 +7104,11 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters" + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/accessProfiles/" + + global::System.Uri.EscapeDataString(roleName) + + "/listCredential" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7505,16 +7117,20 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersGetAccessProfile_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists managed clusters in the specified subscription and resource group. + /// + /// **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) + /// . + /// /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -7524,30 +7140,36 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetAccessProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/accessProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + var roleName = _match.Groups["roleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters" + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/accessProfiles/" + + roleName + + "/listCredential" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7556,47 +7178,57 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersGetAccessProfile_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists managed clusters in the specified subscription and resource group. + /// + /// **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) + /// . + /// /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetAccessProfileViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/accessProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + var roleName = _match.Groups["roleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters" + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/accessProfiles/" + + roleName + + "/listCredential" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7605,27 +7237,33 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersListByResourceGroupWithResult_Call (request, eventListener,sender); + return await this.ManagedClustersGetAccessProfileWithResult_Call (request, eventListener,sender); } } - /// Lists managed clusters in the specified subscription and resource group. - /// The ID of the target subscription. + /// + /// **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. + /// The name of the role for managed cluster accessProfile resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetAccessProfileWithResult(string subscriptionId, string resourceGroupName, string resourceName, string roleName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7635,7 +7273,11 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters" + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/accessProfiles/" + + global::System.Uri.EscapeDataString(roleName) + + "/listCredential" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7644,26 +7286,26 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersListByResourceGroupWithResult_Call (request, eventListener,sender); + return await this.ManagedClustersGetAccessProfileWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersGetAccessProfileWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7682,20 +7324,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAccessProfile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -7715,7 +7357,7 @@ public partial class Aks } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -7725,7 +7367,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersGetAccessProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7744,13 +7386,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAccessProfile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7766,33 +7408,41 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// The ID of the target 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 name of the role for managed cluster accessProfile resource. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ManagedClustersGetAccessProfile_Validate(string subscriptionId, string resourceGroupName, string resourceName, string roleName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(roleName),roleName); } } - /// Lists the admin credentials of a managed cluster. - /// The ID of the target subscription. + /// 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. - /// server fqdn type for credentials to be returned + /// Id of the command. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -7800,9 +7450,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListClusterAdminCredentials(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetCommandResult(string subscriptionId, string resourceGroupName, string resourceName, string commandId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7814,30 +7464,29 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/listClusterAdminCredential" + + "/commandResults/" + + global::System.Uri.EscapeDataString(commandId) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersListClusterAdminCredentials_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersGetCommandResult_Call (request, onOk,onAccepted,onDefault,eventListener,sender); } } - /// Lists the admin credentials of a managed cluster. + /// Gets the results of a command which has been run on the Managed Cluster. /// - /// server fqdn type for credentials to be returned /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -7845,24 +7494,25 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListClusterAdminCredentialsViaIdentity(global::System.String viaIdentity, string serverFqdn, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetCommandResultViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/commandResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var commandId = _match.Groups["commandId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -7871,53 +7521,52 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/listClusterAdminCredential" + + "/commandResults/" + + commandId + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersListClusterAdminCredentials_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersGetCommandResult_Call (request, onOk,onAccepted,onDefault,eventListener,sender); } } - /// Lists the admin credentials of a managed cluster. + /// Gets the results of a command which has been run on the Managed Cluster. /// - /// server fqdn type for credentials to be returned /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A + /// A /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListClusterAdminCredentialsViaIdentityWithResult(global::System.String viaIdentity, string serverFqdn, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetCommandResultViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/commandResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var commandId = _match.Groups["commandId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -7926,40 +7575,39 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/listClusterAdminCredential" + + "/commandResults/" + + commandId + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersListClusterAdminCredentialsWithResult_Call (request, eventListener,sender); + return await this.ManagedClustersGetCommandResultWithResult_Call (request, eventListener,sender); } } - /// Lists the admin credentials of a managed cluster. - /// The ID of the target subscription. + /// 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. - /// server fqdn type for credentials to be returned + /// Id of the command. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A + /// A /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListClusterAdminCredentialsWithResult(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetCommandResultWithResult(string subscriptionId, string resourceGroupName, string resourceName, string commandId, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7971,37 +7619,36 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/listClusterAdminCredential" + + "/commandResults/" + + global::System.Uri.EscapeDataString(commandId) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersListClusterAdminCredentialsWithResult_Call (request, eventListener,sender); + return await this.ManagedClustersGetCommandResultWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A + /// A /// that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListClusterAdminCredentialsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersGetCommandResultWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8020,20 +7667,25 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RunCommandResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -8053,11 +7705,10 @@ public partial class Aks } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -8065,7 +7716,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListClusterAdminCredentials_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersGetCommandResult_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8084,13 +7735,19 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RunCommandResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8106,23 +7763,23 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// The ID of the target 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. - /// server fqdn type for credentials to be returned + /// Id of the command. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListClusterAdminCredentials_Validate(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ManagedClustersGetCommandResult_Validate(string subscriptionId, string resourceGroupName, string resourceName, string commandId, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -8130,15 +7787,16 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(serverFqdn),serverFqdn); + await eventListener.AssertNotNull(nameof(commandId),commandId); } } - /// Lists the cluster monitoring user credentials of a managed cluster. - /// The ID of the target subscription. - /// 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 + /// + /// 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 Azure region. + /// The mode of the mesh. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -8147,9 +7805,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListClusterMonitoringUserCredentials(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetMeshRevisionProfile(string subscriptionId, string location, string mode, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8157,33 +7815,31 @@ public partial class Aks var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/listClusterMonitoringUserCredential" + + "/providers/Microsoft.ContainerService/locations/" + + global::System.Uri.EscapeDataString(location) + + "/meshRevisionProfiles/" + + global::System.Uri.EscapeDataString(mode) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersListClusterMonitoringUserCredentials_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersGetMeshRevisionProfile_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists the cluster monitoring user credentials of a managed cluster. + /// + /// Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades + /// /// - /// server fqdn type for credentials to be returned /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -8192,121 +7848,117 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListClusterMonitoringUserCredentialsViaIdentity(global::System.String viaIdentity, string serverFqdn, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetMeshRevisionProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/locations/(?[^/]+)/meshRevisionProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; + var location = _match.Groups["location"].Value; + var mode = _match.Groups["mode"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/listClusterMonitoringUserCredential" + + "/providers/Microsoft.ContainerService/locations/" + + location + + "/meshRevisionProfiles/" + + mode + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersListClusterMonitoringUserCredentials_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersGetMeshRevisionProfile_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists the cluster monitoring user credentials of a managed cluster. + /// + /// Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades + /// /// - /// server fqdn type for credentials to be returned /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A - /// that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListClusterMonitoringUserCredentialsViaIdentityWithResult(global::System.String viaIdentity, string serverFqdn, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetMeshRevisionProfileViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/locations/(?[^/]+)/meshRevisionProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; + var location = _match.Groups["location"].Value; + var mode = _match.Groups["mode"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/listClusterMonitoringUserCredential" + + "/providers/Microsoft.ContainerService/locations/" + + location + + "/meshRevisionProfiles/" + + mode + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersListClusterMonitoringUserCredentialsWithResult_Call (request, eventListener,sender); + return await this.ManagedClustersGetMeshRevisionProfileWithResult_Call (request, eventListener,sender); } } - /// Lists the cluster monitoring user credentials of a managed cluster. - /// The ID of the target subscription. - /// 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 + /// + /// 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 Azure region. + /// The mode of the mesh. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A - /// that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListClusterMonitoringUserCredentialsWithResult(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetMeshRevisionProfileWithResult(string subscriptionId, string location, string mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8314,41 +7966,38 @@ public partial class Aks var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/listClusterMonitoringUserCredential" + + "/providers/Microsoft.ContainerService/locations/" + + global::System.Uri.EscapeDataString(location) + + "/meshRevisionProfiles/" + + global::System.Uri.EscapeDataString(mode) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersListClusterMonitoringUserCredentialsWithResult_Call (request, eventListener,sender); + return await this.ManagedClustersGetMeshRevisionProfileWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A - /// that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListClusterMonitoringUserCredentialsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersGetMeshRevisionProfileWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8367,20 +8016,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -8401,7 +8050,7 @@ public partial class Aks } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). @@ -8412,7 +8061,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListClusterMonitoringUserCredentials_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersGetMeshRevisionProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8431,13 +8080,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8453,42 +8102,36 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual - /// call, but you will get validation events back. + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. /// - /// The ID of the target subscription. - /// 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 ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The mode of the mesh. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListClusterMonitoringUserCredentials_Validate(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ManagedClustersGetMeshRevisionProfile_Validate(string subscriptionId, string location, string mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(resourceName),resourceName); - await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); - await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); - await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(serverFqdn),serverFqdn); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(mode),mode); + await eventListener.AssertMinimumLength(nameof(mode),mode,1); + await eventListener.AssertMaximumLength(nameof(mode),mode,24); + await eventListener.AssertRegEx(nameof(mode), mode, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - /// Lists the user credentials of a managed cluster. - /// The ID of the target subscription. + /// 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. - /// 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 mode of the mesh. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -8497,9 +8140,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListClusterUserCredentials(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, string format, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetMeshUpgradeProfile(string subscriptionId, string resourceGroupName, string resourceName, string mode, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8511,34 +8154,27 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/listClusterUserCredential" + + "/meshUpgradeProfiles/" + + global::System.Uri.EscapeDataString(mode) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) - + "&" - + (string.IsNullOrEmpty(format) ? global::System.String.Empty : "format=" + global::System.Uri.EscapeDataString(format)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersListClusterUserCredentials_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersGetMeshUpgradeProfile_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists the user credentials of a managed cluster. + /// Gets available upgrades for a service mesh in a 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. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -8547,24 +8183,25 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListClusterUserCredentialsViaIdentity(global::System.String viaIdentity, string serverFqdn, string format, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetMeshUpgradeProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/meshUpgradeProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var mode = _match.Groups["mode"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -8573,58 +8210,52 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/listClusterUserCredential" + + "/meshUpgradeProfiles/" + + mode + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) - + "&" - + (string.IsNullOrEmpty(format) ? global::System.String.Empty : "format=" + global::System.Uri.EscapeDataString(format)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersListClusterUserCredentials_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersGetMeshUpgradeProfile_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists the user credentials of a managed cluster. + /// Gets available upgrades for a service mesh in a 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. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A + /// A /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListClusterUserCredentialsViaIdentityWithResult(global::System.String viaIdentity, string serverFqdn, string format, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetMeshUpgradeProfileViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/meshUpgradeProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var mode = _match.Groups["mode"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -8633,45 +8264,39 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/listClusterUserCredential" + + "/meshUpgradeProfiles/" + + mode + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) - + "&" - + (string.IsNullOrEmpty(format) ? global::System.String.Empty : "format=" + global::System.Uri.EscapeDataString(format)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersListClusterUserCredentialsWithResult_Call (request, eventListener,sender); + return await this.ManagedClustersGetMeshUpgradeProfileWithResult_Call (request, eventListener,sender); } } - /// Lists the user credentials of a managed cluster. - /// The ID of the target subscription. + /// 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. - /// 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 mode of the mesh. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A + /// A /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListClusterUserCredentialsWithResult(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, string format, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetMeshUpgradeProfileWithResult(string subscriptionId, string resourceGroupName, string resourceName, string mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8683,39 +8308,36 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/listClusterUserCredential" + + "/meshUpgradeProfiles/" + + global::System.Uri.EscapeDataString(mode) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) - + "&" - + (string.IsNullOrEmpty(format) ? global::System.String.Empty : "format=" + global::System.Uri.EscapeDataString(format)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersListClusterUserCredentialsWithResult_Call (request, eventListener,sender); + return await this.ManagedClustersGetMeshUpgradeProfileWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A + /// A /// that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListClusterUserCredentialsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersGetMeshUpgradeProfileWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8734,20 +8356,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -8768,7 +8390,7 @@ public partial class Aks } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). @@ -8779,7 +8401,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListClusterUserCredentials_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersGetMeshUpgradeProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8798,13 +8420,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8820,26 +8442,23 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. /// - /// The ID of the target 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. - /// 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 mode of the mesh. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListClusterUserCredentials_Validate(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, string format, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ManagedClustersGetMeshUpgradeProfile_Validate(string subscriptionId, string resourceGroupName, string resourceName, string mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -8847,16 +8466,15 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(serverFqdn),serverFqdn); - await eventListener.AssertNotNull(nameof(format),format); + await eventListener.AssertNotNull(nameof(mode),mode); + await eventListener.AssertMinimumLength(nameof(mode),mode,1); + await eventListener.AssertMaximumLength(nameof(mode),mode,24); + await eventListener.AssertRegEx(nameof(mode), mode, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - /// - /// 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. + /// 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. /// a delegate that is called when the remote service returns 200 (OK). @@ -8867,9 +8485,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetUpgradeProfile(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8881,7 +8499,7 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/outboundNetworkDependenciesEndpoints" + + "/upgradeProfiles/default" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -8895,14 +8513,11 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersListOutboundNetworkDependenciesEndpoints_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersGetUpgradeProfile_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// 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. - /// + /// Gets the upgrade profile of a managed cluster. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -8912,18 +8527,18 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListOutboundNetworkDependenciesEndpointsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetUpgradeProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/outboundNetworkDependenciesEndpoints$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/upgradeProfiles/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'"); } // replace URI parameters with values from identity @@ -8938,7 +8553,7 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/outboundNetworkDependenciesEndpoints" + + "/upgradeProfiles/default" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -8952,33 +8567,30 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersListOutboundNetworkDependenciesEndpoints_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersGetUpgradeProfile_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// 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. - /// + /// Gets the upgrade profile of a managed cluster. /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListOutboundNetworkDependenciesEndpointsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetUpgradeProfileViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/outboundNetworkDependenciesEndpoints$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/upgradeProfiles/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'"); } // replace URI parameters with values from identity @@ -8993,7 +8605,7 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/outboundNetworkDependenciesEndpoints" + + "/upgradeProfiles/default" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9007,26 +8619,23 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersListOutboundNetworkDependenciesEndpointsWithResult_Call (request, eventListener,sender); + return await this.ManagedClustersGetUpgradeProfileWithResult_Call (request, eventListener,sender); } } - /// - /// 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. + /// 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. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListOutboundNetworkDependenciesEndpointsWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetUpgradeProfileWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9038,7 +8647,7 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/outboundNetworkDependenciesEndpoints" + + "/upgradeProfiles/default" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9052,21 +8661,21 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersListOutboundNetworkDependenciesEndpointsWithResult_Call (request, eventListener,sender); + return await this.ManagedClustersGetUpgradeProfileWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListOutboundNetworkDependenciesEndpointsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersGetUpgradeProfileWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9085,20 +8694,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OutboundEnvironmentEndpointCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterUpgradeProfile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -9118,9 +8727,7 @@ public partial class Aks } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -9130,7 +8737,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListOutboundNetworkDependenciesEndpoints_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersGetUpgradeProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9149,13 +8756,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OutboundEnvironmentEndpointCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterUpgradeProfile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9171,22 +8778,22 @@ public partial class Aks } /// - /// Validation method for method. Call this like the - /// actual call, but you will get validation events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// - /// The ID of the target 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. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListOutboundNetworkDependenciesEndpoints_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ManagedClustersGetUpgradeProfile_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -9197,7 +8804,7 @@ public partial class Aks } } - /// Gets a list of managed clusters in the specified subscription. + /// Gets a managed cluster. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -9207,27 +8814,32 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.ContainerService/managedClusters" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9241,39 +8853,44 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersList_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets a list of managed clusters in the specified subscription. + /// Gets a managed cluster. /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.ContainerService/managedClusters" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9287,21 +8904,23 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersListWithResult_Call (request, eventListener,sender); + return await this.ManagedClustersGetWithResult_Call (request, eventListener,sender); } } - /// Gets a list of managed clusters in the specified subscription. - /// The ID of the target subscription. + /// 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. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersListWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersGetWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9309,7 +8928,10 @@ public partial class Aks var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.ContainerService/managedClusters" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9323,19 +8945,19 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersListWithResult_Call (request, eventListener,sender); + return await this.ManagedClustersGetWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9354,20 +8976,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -9387,7 +9009,7 @@ public partial class Aks } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -9397,7 +9019,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9416,13 +9038,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9438,43 +9060,45 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// The ID of the target 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. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ManagedClustersGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - /// - /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) - /// to reset your cluster with AKS-managed Azure AD. - /// - /// The ID of the target subscription. - /// 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 + /// Gets a list of managed clusters in the specified subscription. + /// The ID of the target subscription. The value must be an UUID. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersResetAadProfile(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAadProfile body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task ManagedClustersList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9482,11 +9106,7 @@ public partial class Aks var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/resetAADProfile" + + "/providers/Microsoft.ContainerService/managedClusters" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9495,61 +9115,39 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersResetAadProfile_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersList_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) - /// to reset your cluster with AKS-managed Azure AD. - /// - /// - /// The AAD profile to set on the Managed Cluster + /// 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. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersResetAadProfileViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAadProfile body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task ManagedClustersListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/resetAADProfile" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9558,27 +9156,17 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersResetAadProfile_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) - /// to reset your cluster with AKS-managed Azure AD. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// Json string supplied to the ManagedClustersResetAadProfile operation + /// Lists managed clusters in the specified subscription and resource group. + /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -9587,21 +9175,5197 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersResetAadProfileViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists managed clusters in the specified subscription and resource group. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// 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. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + } + } + + /// 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. + /// server fqdn type for credentials to be returned + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListClusterAdminCredentials(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/listClusterAdminCredential" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListClusterAdminCredentials_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists the admin credentials of a managed cluster. + /// + /// server fqdn type for credentials to be returned + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListClusterAdminCredentialsViaIdentity(global::System.String viaIdentity, string serverFqdn, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/listClusterAdminCredential" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListClusterAdminCredentials_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists the admin credentials of a managed cluster. + /// + /// server fqdn type for credentials to be returned + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListClusterAdminCredentialsViaIdentityWithResult(global::System.String viaIdentity, string serverFqdn, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/listClusterAdminCredential" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListClusterAdminCredentialsWithResult_Call (request, eventListener,sender); + } + } + + /// 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. + /// server fqdn type for credentials to be returned + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListClusterAdminCredentialsWithResult(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/listClusterAdminCredential" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListClusterAdminCredentialsWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListClusterAdminCredentialsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListClusterAdminCredentials_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// 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 + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListClusterAdminCredentials_Validate(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(serverFqdn),serverFqdn); + } + } + + /// 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. + /// server fqdn type for credentials to be returned + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListClusterMonitoringUserCredentials(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/listClusterMonitoringUserCredential" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListClusterMonitoringUserCredentials_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists the cluster monitoring user credentials of a managed cluster. + /// + /// server fqdn type for credentials to be returned + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListClusterMonitoringUserCredentialsViaIdentity(global::System.String viaIdentity, string serverFqdn, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/listClusterMonitoringUserCredential" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListClusterMonitoringUserCredentials_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists the cluster monitoring user credentials of a managed cluster. + /// + /// server fqdn type for credentials to be returned + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListClusterMonitoringUserCredentialsViaIdentityWithResult(global::System.String viaIdentity, string serverFqdn, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/listClusterMonitoringUserCredential" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListClusterMonitoringUserCredentialsWithResult_Call (request, eventListener,sender); + } + } + + /// 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. + /// server fqdn type for credentials to be returned + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListClusterMonitoringUserCredentialsWithResult(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/listClusterMonitoringUserCredential" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListClusterMonitoringUserCredentialsWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListClusterMonitoringUserCredentialsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListClusterMonitoringUserCredentials_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual + /// call, but you will get validation events back. + /// + /// 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 + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListClusterMonitoringUserCredentials_Validate(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(serverFqdn),serverFqdn); + } + } + + /// 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. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListClusterUserCredentials(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, string format, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/listClusterUserCredential" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) + + "&" + + (string.IsNullOrEmpty(format) ? global::System.String.Empty : "format=" + global::System.Uri.EscapeDataString(format)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListClusterUserCredentials_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists the user credentials of a 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. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListClusterUserCredentialsViaIdentity(global::System.String viaIdentity, string serverFqdn, string format, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/listClusterUserCredential" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) + + "&" + + (string.IsNullOrEmpty(format) ? global::System.String.Empty : "format=" + global::System.Uri.EscapeDataString(format)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListClusterUserCredentials_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists the user credentials of a 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. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListClusterUserCredentialsViaIdentityWithResult(global::System.String viaIdentity, string serverFqdn, string format, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/listClusterUserCredential" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) + + "&" + + (string.IsNullOrEmpty(format) ? global::System.String.Empty : "format=" + global::System.Uri.EscapeDataString(format)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListClusterUserCredentialsWithResult_Call (request, eventListener,sender); + } + } + + /// 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. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListClusterUserCredentialsWithResult(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, string format, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/listClusterUserCredential" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(serverFqdn) ? global::System.String.Empty : "server-fqdn=" + global::System.Uri.EscapeDataString(serverFqdn)) + + "&" + + (string.IsNullOrEmpty(format) ? global::System.String.Empty : "format=" + global::System.Uri.EscapeDataString(format)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListClusterUserCredentialsWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListClusterUserCredentialsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListClusterUserCredentials_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// 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. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListClusterUserCredentials_Validate(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, string format, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(serverFqdn),serverFqdn); + await eventListener.AssertNotNull(nameof(format),format); + } + } + + /// + /// Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details + /// on preview status of the version + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListKubernetesVersions(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.ContainerService/locations/" + + global::System.Uri.EscapeDataString(location) + + "/kubernetesVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListKubernetesVersions_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details + /// on preview status of the version + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListKubernetesVersionsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/locations/(?[^/]+)/kubernetesVersions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/kubernetesVersions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.ContainerService/locations/" + + location + + "/kubernetesVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListKubernetesVersions_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details + /// on preview status of the version + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListKubernetesVersionsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/locations/(?[^/]+)/kubernetesVersions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/kubernetesVersions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.ContainerService/locations/" + + location + + "/kubernetesVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListKubernetesVersionsWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details + /// on preview status of the version + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListKubernetesVersionsWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.ContainerService/locations/" + + global::System.Uri.EscapeDataString(location) + + "/kubernetesVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListKubernetesVersionsWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListKubernetesVersionsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListKubernetesVersions_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListKubernetesVersions_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// + /// 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. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListMeshRevisionProfiles(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.ContainerService/locations/" + + global::System.Uri.EscapeDataString(location) + + "/meshRevisionProfiles" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListMeshRevisionProfiles_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListMeshRevisionProfilesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/locations/(?[^/]+)/meshRevisionProfiles$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.ContainerService/locations/" + + location + + "/meshRevisionProfiles" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListMeshRevisionProfiles_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListMeshRevisionProfilesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/locations/(?[^/]+)/meshRevisionProfiles$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.ContainerService/locations/" + + location + + "/meshRevisionProfiles" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListMeshRevisionProfilesWithResult_Call (request, eventListener,sender); + } + } + + /// + /// 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. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListMeshRevisionProfilesWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.ContainerService/locations/" + + global::System.Uri.EscapeDataString(location) + + "/meshRevisionProfiles" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListMeshRevisionProfilesWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListMeshRevisionProfilesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfileList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListMeshRevisionProfiles_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfileList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListMeshRevisionProfiles_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// 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. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListMeshUpgradeProfiles(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/meshUpgradeProfiles" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListMeshUpgradeProfiles_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists available upgrades for all service meshes in a specific cluster. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListMeshUpgradeProfilesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/meshUpgradeProfiles$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/meshUpgradeProfiles" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListMeshUpgradeProfiles_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists available upgrades for all service meshes in a specific cluster. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListMeshUpgradeProfilesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/meshUpgradeProfiles$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/meshUpgradeProfiles" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListMeshUpgradeProfilesWithResult_Call (request, eventListener,sender); + } + } + + /// 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. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListMeshUpgradeProfilesWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/meshUpgradeProfiles" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListMeshUpgradeProfilesWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListMeshUpgradeProfilesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfileList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListMeshUpgradeProfiles_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfileList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// 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. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListMeshUpgradeProfiles_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + + /// + /// 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. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/outboundNetworkDependenciesEndpoints" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListOutboundNetworkDependenciesEndpoints_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListOutboundNetworkDependenciesEndpointsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/outboundNetworkDependenciesEndpoints$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/outboundNetworkDependenciesEndpoints" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersListOutboundNetworkDependenciesEndpoints_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListOutboundNetworkDependenciesEndpointsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/outboundNetworkDependenciesEndpoints$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/outboundNetworkDependenciesEndpoints" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListOutboundNetworkDependenciesEndpointsWithResult_Call (request, eventListener,sender); + } + } + + /// + /// 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. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListOutboundNetworkDependenciesEndpointsWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/outboundNetworkDependenciesEndpoints" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListOutboundNetworkDependenciesEndpointsWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListOutboundNetworkDependenciesEndpointsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OutboundEnvironmentEndpointCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListOutboundNetworkDependenciesEndpoints_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OutboundEnvironmentEndpointCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the + /// actual call, but you will get validation events back. + /// + /// 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. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListOutboundNetworkDependenciesEndpoints_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + + /// Gets a list of managed clusters in the specified subscription. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.ContainerService/managedClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets a list of managed clusters in the specified subscription. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.ContainerService/managedClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListWithResult_Call (request, eventListener,sender); + } + } + + /// Gets a list of managed clusters in the specified subscription. + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersListWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.ContainerService/managedClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) + /// to reset 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 + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersResetAadProfile(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAadProfile body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/resetAADProfile" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersResetAadProfile_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) + /// to reset your cluster with AKS-managed Azure AD. + /// + /// + /// The AAD profile to set on the Managed Cluster + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersResetAadProfileViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAadProfile body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/resetAADProfile" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersResetAadProfile_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) + /// to reset 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. + /// Json string supplied to the ManagedClustersResetAadProfile operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersResetAadProfileViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/resetAADProfile" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersResetAadProfile_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersResetAadProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// 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 + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersResetAadProfile_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAadProfile body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// 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 service principal profile to set on the managed cluster. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersResetServicePrincipalProfile(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterServicePrincipalProfile body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/resetServicePrincipalProfile" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersResetServicePrincipalProfile_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// This action cannot be performed on a cluster that is not using a service principal + /// + /// + /// The service principal profile to set on the managed cluster. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersResetServicePrincipalProfileViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterServicePrincipalProfile body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/resetServicePrincipalProfile" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersResetServicePrincipalProfile_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// Json string supplied to the ManagedClustersResetServicePrincipalProfile operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersResetServicePrincipalProfileViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/resetServicePrincipalProfile" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersResetServicePrincipalProfile_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersResetServicePrincipalProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// 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. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersResetServicePrincipalProfile_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterServicePrincipalProfile body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// 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. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersRotateClusterCertificates(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/rotateClusterCertificates" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersRotateClusterCertificates_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// + /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating + /// managed cluster certificates. + /// + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersRotateClusterCertificatesViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/rotateClusterCertificates" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersRotateClusterCertificates_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersRotateClusterCertificates_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// 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. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersRotateClusterCertificates_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + + /// 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. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersRotateServiceAccountSigningKeys(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/rotateServiceAccountSigningKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersRotateServiceAccountSigningKeys_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Rotates the service account signing keys of a managed cluster. + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersRotateServiceAccountSigningKeysViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/rotateServiceAccountSigningKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersRotateServiceAccountSigningKeys_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersRotateServiceAccountSigningKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual + /// call, but you will get validation events back. + /// + /// 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. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersRotateServiceAccountSigningKeys_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + + /// + /// AKS will run 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 resource group. The name is case insensitive. + /// The name of the managed cluster resource. + /// The run command request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersRunCommand(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/runCommand" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersRunCommand_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// AKS will run 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 run command request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersRunCommandViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/runCommand" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersRunCommand_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// AKS will run 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 run command request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersRunCommandViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandRequest body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/runCommand" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersRunCommandWithResult_Call (request, eventListener,sender); + } + } + + /// + /// AKS will run 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 resource group. The name is case insensitive. + /// The name of the managed cluster resource. + /// Json string supplied to the ManagedClustersRunCommand operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersRunCommandViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/runCommand" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersRunCommand_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// AKS will run 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 resource group. The name is case insensitive. + /// The name of the managed cluster resource. + /// Json string supplied to the ManagedClustersRunCommand operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersRunCommandViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/runCommand" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersRunCommandWithResult_Call (request, eventListener,sender); + } + } + + /// + /// AKS will run 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 resource group. The name is case insensitive. + /// The name of the managed cluster resource. + /// The run command request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersRunCommandWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandRequest body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/runCommand" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersRunCommandWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersRunCommandWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RunCommandResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersRunCommand_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RunCommandResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// 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 + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersRunCommand_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandRequest body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// 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 resource group. The name is case insensitive. + /// The name of the managed cluster resource. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersStart(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/start" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersStart_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. + /// + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersStartViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/start" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersStart_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersStart_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// 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. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersStart_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + + /// + /// 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. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersStop(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/stop" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersStop_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersStopViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/resetAADProfile" + + resourceName + + "/stop" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9614,17 +14378,14 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersResetAadProfile_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersStop_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -9633,7 +14394,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersResetAadProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersStop_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9748,10 +14509,16 @@ public partial class Aks await onOk(_response); break; } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9767,23 +14534,22 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// The ID of the target 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 AAD profile to set on the Managed Cluster /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersResetAadProfile_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAadProfile body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ManagedClustersStop_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -9791,18 +14557,15 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// This action cannot be performed on a cluster that is not using a service principal - /// - /// The ID of the target subscription. + /// update 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. - /// The service principal profile to set on the managed cluster. + /// The request should only proceed if an entity matches this string. + /// Parameters supplied to the Update Managed Cluster Tags operation. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -9812,9 +14575,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersResetServicePrincipalProfile(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterServicePrincipalProfile body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task ManagedClustersUpdateTags(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9826,7 +14589,6 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/resetServicePrincipalProfile" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9835,24 +14597,29 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersResetServicePrincipalProfile_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersUpdateTags_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// This action cannot be performed on a cluster that is not using a service principal - /// + /// update tags on a managed cluster. /// - /// The service principal profile to set on the managed cluster. + /// The request should only proceed if an entity matches this string. + /// Parameters supplied to the Update Managed Cluster Tags operation. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -9862,9 +14629,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersResetServicePrincipalProfileViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterServicePrincipalProfile body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task ManagedClustersUpdateTagsViaIdentity(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9888,7 +14655,6 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/resetServicePrincipalProfile" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9897,37 +14663,213 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersResetServicePrincipalProfile_Call (request, onOk,onDefault,eventListener,sender); + await this.ManagedClustersUpdateTags_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// update tags on a managed cluster. + /// + /// The request should only proceed if an entity matches this string. + /// Parameters supplied to the Update Managed Cluster Tags operation. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersUpdateTagsViaIdentityWithResult(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersUpdateTagsWithResult_Call (request, eventListener,sender); + } + } + + /// update 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. + /// The request should only proceed if an entity matches this string. + /// Json string supplied to the ManagedClustersUpdateTags operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersUpdateTagsViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ManagedClustersUpdateTags_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// update 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. + /// The request should only proceed if an entity matches this string. + /// Json string supplied to the ManagedClustersUpdateTags operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ManagedClustersUpdateTagsViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ManagedClustersUpdateTagsWithResult_Call (request, eventListener,sender); } } - /// - /// This action cannot be performed on a cluster that is not using a service principal - /// - /// The ID of the target subscription. + /// update 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. - /// Json string supplied to the ManagedClustersResetServicePrincipalProfile operation - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// The request should only proceed if an entity matches this string. + /// Parameters supplied to the Update Managed Cluster Tags operation. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersResetServicePrincipalProfileViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ManagedClustersUpdateTagsWithResult(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9939,32 +14881,192 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/resetServicePrincipalProfile" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ManagedClustersResetServicePrincipalProfile_Call (request, onOk,onDefault,eventListener,sender); + return await this.ManagedClustersUpdateTagsWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ManagedClustersUpdateTagsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -9973,7 +15075,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersResetServicePrincipalProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ManagedClustersUpdateTags_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9987,8 +15089,7 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); + // declared final-state-via: default var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); var operationLocation = _response.GetFirstHeader(@"Operation-Location"); @@ -10066,16 +15167,19 @@ public partial class Aks continue; } // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - // drop the old response - _response?.Dispose(); + // drop the old response + _response?.Dispose(); - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -10085,13 +15189,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10107,23 +15211,24 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// - /// The ID of the target 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 service principal profile to set on the managed cluster. + /// The request should only proceed if an entity matches this string. + /// Parameters supplied to the Update Managed Cluster Tags operation. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersResetServicePrincipalProfile_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterServicePrincipalProfile body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ManagedClustersUpdateTags_Validate(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -10131,19 +15236,50 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// a delegate that is called when the remote service returns 204 (NoContent). + /// Gets a list of operations. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.ContainerService/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets a list of operations. + /// + /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -10151,21 +15287,24 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersRotateClusterCertificates(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.ContainerService/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.ContainerService/operations'"); + } + + // replace URI parameters with values from identity // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/rotateClusterCertificates" + "/providers/Microsoft.ContainerService/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10174,203 +15313,187 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersRotateClusterCertificates_Call (request, onNoContent,onDefault,eventListener,sender); + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating - /// managed cluster certificates. - /// + /// Gets a list of operations. /// - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersRotateClusterCertificatesViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.ContainerService/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.ContainerService/operations'"); } // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/rotateClusterCertificates" + "/providers/Microsoft.ContainerService/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ManagedClustersRotateClusterCertificates_Call (request, onNoContent,onDefault,eventListener,sender); + return await this.OperationsListWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Gets a list of operations. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.ContainerService/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersRotateClusterCertificates_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + default: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { - case global::System.Net.HttpStatusCode.NoContent: + case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10385,37 +15508,28 @@ public partial class Aks } } - /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersRotateClusterCertificates_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(resourceName),resourceName); - await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); - await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); - await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } } - /// Rotates the service account signing keys of a managed cluster. - /// The ID of the target subscription. + /// Deletes a private endpoint connection. + /// 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 private endpoint connection. + /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -10424,9 +15538,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersRotateServiceAccountSigningKeys(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10438,7 +15552,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/rotateServiceAccountSigningKeys" + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10447,17 +15562,18 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersRotateServiceAccountSigningKeys_Call (request, onNoContent,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Rotates the service account signing keys of a managed cluster. + /// Deletes a private endpoint connection. /// + /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -10466,24 +15582,25 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersRotateServiceAccountSigningKeysViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -10492,7 +15609,8 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/rotateServiceAccountSigningKeys" + + "/privateEndpointConnections/" + + privateEndpointConnectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10501,19 +15619,18 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersRotateServiceAccountSigningKeys_Call (request, onNoContent,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -10522,7 +15639,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersRotateServiceAccountSigningKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10536,7 +15653,7 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: location + // declared final-state-via: default var _finalUri = _response.GetFirstHeader(@"Location"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); @@ -10615,22 +15732,31 @@ public partial class Aks continue; } // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - // drop the old response - _response?.Dispose(); + // drop the old response + _response?.Dispose(); - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } case global::System.Net.HttpStatusCode.NoContent: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -10640,7 +15766,7 @@ public partial class Aks default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10656,22 +15782,23 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual - /// call, but you will get validation events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// - /// The ID of the target 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 name of the private endpoint connection. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersRotateServiceAccountSigningKeys_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -10679,29 +15806,28 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); } } /// - /// AKS will run 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). + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// - /// The ID of the target 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 run command request + /// The name of the private endpoint connection. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersRunCommand(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10713,7 +15839,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/runCommand" + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10722,52 +15849,46 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersRunCommand_Call (request, onOk,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsGet_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// AKS will run 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). + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// /// - /// The run command request /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersRunCommandViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -10776,7 +15897,8 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/runCommand" + + "/privateEndpointConnections/" + + privateEndpointConnectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10785,50 +15907,44 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersRunCommand_Call (request, onOk,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsGet_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// AKS will run 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). + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// /// - /// The run command request /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// - /// A - /// that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersRunCommandViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandRequest body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -10837,109 +15953,8 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/runCommand" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.ManagedClustersRunCommandWithResult_Call (request, eventListener,sender); - } - } - - /// - /// AKS will run 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 name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// Json string supplied to the ManagedClustersRunCommand operation - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ManagedClustersRunCommandViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/runCommand" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ManagedClustersRunCommand_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// - /// AKS will run 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 name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// Json string supplied to the ManagedClustersRunCommand operation - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A - /// that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ManagedClustersRunCommandViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/runCommand" + + "/privateEndpointConnections/" + + privateEndpointConnectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10948,37 +15963,31 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersRunCommandWithResult_Call (request, eventListener,sender); + return await this.PrivateEndpointConnectionsGetWithResult_Call (request, eventListener,sender); } } /// - /// AKS will run 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). + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// - /// The ID of the target 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 run command request + /// The name of the private endpoint connection. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// - /// A - /// that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersRunCommandWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandRequest body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetWithResult(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10990,7 +15999,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/runCommand" + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10999,133 +16009,36 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersRunCommandWithResult_Call (request, eventListener,sender); + return await this.PrivateEndpointConnectionsGetWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A - /// that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersRunCommandWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - break; - } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -11134,20 +16047,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RunCommandResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -11167,7 +16080,7 @@ public partial class Aks } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -11177,110 +16090,17 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersRunCommand_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -11289,13 +16109,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RunCommandResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -11311,23 +16131,23 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// The ID of the target 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 run command request + /// The name of the private endpoint connection. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersRunCommand_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandRequest body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -11335,18 +16155,61 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); + } + } + + /// + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters + /// + /// 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. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/privateEndpointConnections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsList_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// a delegate that is called when the remote service returns 204 (NoContent). + /// + /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -11354,21 +16217,33 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersStart(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateEndpointConnections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/start" + + resourceName + + "/privateEndpointConnections" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11377,39 +16252,37 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersStart_Call (request, onNoContent,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsList_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// /// - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersStartViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateEndpointConnections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'"); } // replace URI parameters with values from identity @@ -11424,153 +16297,166 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/start" + + "/privateEndpointConnections" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ManagedClustersStart_Call (request, onNoContent,onDefault,eventListener,sender); + return await this.PrivateEndpointConnectionsListWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters + /// + /// 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. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/privateEndpointConnections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateEndpointConnectionsListWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersStart_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + default: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { - case global::System.Net.HttpStatusCode.NoContent: + case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -11586,22 +16472,22 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// The ID of the target 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. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersStart_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -11612,26 +16498,25 @@ public partial class Aks } } - /// - /// 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. + /// update a private endpoint connection. + /// 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. - /// a delegate that is called when the remote service returns 204 (NoContent). + /// The name of the private endpoint connection. + /// The updated private endpoint connection. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersStop(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdate(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11643,7 +16528,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/stop" + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11652,48 +16538,51 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersStop_Call (request, onNoContent,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); } } - /// - /// 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. - /// + /// update a private endpoint connection. /// - /// a delegate that is called when the remote service returns 204 (NoContent). + /// The updated private endpoint connection. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersStopViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -11702,7 +16591,8 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/stop" + + "/privateEndpointConnections/" + + privateEndpointConnectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11711,144 +16601,341 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// update a private endpoint connection. + /// + /// The updated private endpoint connection. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/privateEndpointConnections/" + + privateEndpointConnectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateEndpointConnectionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update a private endpoint connection. + /// 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 private endpoint connection. + /// Json string supplied to the PrivateEndpointConnectionsUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// update a private endpoint connection. + /// 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 private endpoint connection. + /// Json string supplied to the PrivateEndpointConnectionsUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateEndpointConnectionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update a private endpoint connection. + /// 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 private endpoint connection. + /// The updated private endpoint connection. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdateWithResult(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ManagedClustersStop_Call (request, onNoContent,onDefault,eventListener,sender); + return await this.PrivateEndpointConnectionsUpdateWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersStop_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + default: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { - case global::System.Net.HttpStatusCode.NoContent: + case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -11864,22 +16951,24 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// - /// The ID of the target 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 name of the private endpoint connection. + /// The updated private endpoint connection. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersStop_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -11887,26 +16976,29 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// update tags on a managed cluster. - /// The ID of the target subscription. + /// + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters + /// + /// 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. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersUpdateTags(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task PrivateLinkResourcesList(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11915,68 +17007,10 @@ public partial class Aks "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ManagedClustersUpdateTags_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// update tags on a managed cluster. - /// - /// Parameters supplied to the Update Managed Cluster Tags operation. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ManagedClustersUpdateTagsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName + + global::System.Uri.EscapeDataString(resourceName) + + "/privateLinkResources" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11985,41 +17019,39 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersUpdateTags_Call (request, onOk,onDefault,eventListener,sender); + await this.PrivateLinkResourcesList_Call (request, onOk,onDefault,eventListener,sender); } } - /// update tags on a managed cluster. + /// + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters + /// /// - /// Parameters supplied to the Update Managed Cluster Tags operation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// - /// A that - /// will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersUpdateTagsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task PrivateLinkResourcesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateLinkResources$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'"); } // replace URI parameters with values from identity @@ -12034,54 +17066,7 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.ManagedClustersUpdateTagsWithResult_Call (request, eventListener,sender); - } - } - - /// update tags on a managed cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// Json string supplied to the ManagedClustersUpdateTags operation - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ManagedClustersUpdateTagsViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) + + "/privateLinkResources" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -12090,44 +17075,52 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ManagedClustersUpdateTags_Call (request, onOk,onDefault,eventListener,sender); + await this.PrivateLinkResourcesList_Call (request, onOk,onDefault,eventListener,sender); } } - /// update tags on a managed cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// Json string supplied to the ManagedClustersUpdateTags operation + /// + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters + /// + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that - /// will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersUpdateTagsViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateLinkResourcesListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateLinkResources$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) + + resourceName + + "/privateLinkResources" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -12136,34 +17129,30 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersUpdateTagsWithResult_Call (request, eventListener,sender); + return await this.PrivateLinkResourcesListWithResult_Call (request, eventListener,sender); } } - /// update tags on a managed cluster. - /// The ID of the target subscription. + /// + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters + /// + /// 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. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// - /// A that - /// will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ManagedClustersUpdateTagsWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task PrivateLinkResourcesListWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12175,6 +17164,7 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) + + "/privateLinkResources" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -12183,135 +17173,34 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ManagedClustersUpdateTagsWithResult_Call (request, eventListener,sender); + return await this.PrivateLinkResourcesListWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that - /// will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersUpdateTagsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - // declared final-state-via: default - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_originalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - break; - } - } + internal async global::System.Threading.Tasks.Task PrivateLinkResourcesListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -12320,20 +17209,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkResourcesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -12353,7 +17242,7 @@ public partial class Aks } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -12363,112 +17252,17 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersUpdateTags_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PrivateLinkResourcesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: default - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_originalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -12477,13 +17271,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkResourcesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -12499,23 +17293,22 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will get + /// Validation method for method. Call this like the actual call, but you will get /// validation events back. /// - /// The ID of the target 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. - /// Parameters supplied to the Update Managed Cluster Tags operation. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ManagedClustersUpdateTags_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PrivateLinkResourcesList_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -12523,29 +17316,38 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Gets a list of operations. + /// Gets the private link service ID for the specified 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. + /// Parameters required in order to resolve a private link service ID. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPost(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.ContainerService/operations" + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/resolvePrivateLinkServiceId" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -12554,43 +17356,165 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + await this.ResolvePrivateLinkServiceIdPost_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets a list of operations. + /// Gets the private link service ID for the specified managed cluster. /// + /// Parameters required in order to resolve a private link service ID. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPostViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.ContainerService/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.ContainerService/operations'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.ContainerService/operations" + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/resolvePrivateLinkServiceId" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ResolvePrivateLinkServiceIdPost_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the private link service ID for the specified managed cluster. + /// + /// Parameters required in order to resolve a private link service ID. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPostViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkResource body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/resolvePrivateLinkServiceId" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ResolvePrivateLinkServiceIdPostWithResult_Call (request, eventListener,sender); + } + } + + /// Gets the private link service ID for the specified 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. + /// Json string supplied to the ResolvePrivateLinkServiceIdPost operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPostViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/resolvePrivateLinkServiceId" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -12599,41 +17523,45 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + await this.ResolvePrivateLinkServiceIdPost_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets a list of operations. - /// + /// Gets the private link service ID for the specified 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. + /// Json string supplied to the ResolvePrivateLinkServiceIdPost operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPostViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.ContainerService/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.ContainerService/operations'"); - } - - // replace URI parameters with values from identity // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.ContainerService/operations" + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/resolvePrivateLinkServiceId" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -12642,31 +17570,46 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.OperationsListWithResult_Call (request, eventListener,sender); + return await this.ResolvePrivateLinkServiceIdPostWithResult_Call (request, eventListener,sender); } } - /// Gets a list of operations. + /// Gets the private link service ID for the specified 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. + /// Parameters required in order to resolve a private link service ID. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPostWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkResource body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.ContainerService/operations" + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/resolvePrivateLinkServiceId" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -12675,24 +17618,30 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.OperationsListWithResult_Call (request, eventListener,sender); + return await this.ResolvePrivateLinkServiceIdPostWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPostWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -12711,20 +17660,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -12733,191 +17682,20 @@ public partial class Aks } } } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - - } - } - - /// Deletes a private endpoint connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// The name of the private endpoint connection. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/privateEndpointConnections/" - + global::System.Uri.EscapeDataString(privateEndpointConnectionName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.PrivateEndpointConnectionsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); - } - } - - /// Deletes a private endpoint connection. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; - var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/privateEndpointConnections/" - + privateEndpointConnectionName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.PrivateEndpointConnectionsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -12925,113 +17703,17 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPost_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_finalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -13040,19 +17722,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -13068,23 +17744,23 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// The ID of the target 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 name of the private endpoint connection. + /// Parameters required in order to resolve a private link service ID. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPost_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkResource body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -13092,28 +17768,29 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - /// - /// The ID of the target subscription. + /// update a snapshot. + /// 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 private endpoint connection. + /// The snapshot to create or update. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13123,10 +17800,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/snapshots/" + global::System.Uri.EscapeDataString(resourceName) - + "/privateEndpointConnections/" - + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13135,56 +17810,164 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsGet_Call (request, onOk,onDefault,eventListener,sender); + await this.SnapshotsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); } } - /// - /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - /// + /// update a snapshot. /// + /// The snapshot to create or update. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; - var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/snapshots/" + + resourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SnapshotsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// update a snapshot. + /// + /// The snapshot to create or update. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/snapshots/" + + resourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SnapshotsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update a snapshot. + /// 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. + /// Json string supplied to the SnapshotsCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/privateEndpointConnections/" - + privateEndpointConnectionName + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/snapshots/" + + global::System.Uri.EscapeDataString(resourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13193,54 +17976,44 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsGet_Call (request, onOk,onDefault,eventListener,sender); + await this.SnapshotsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); } } - /// - /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - /// - /// + /// update a snapshot. + /// 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. + /// Json string supplied to the SnapshotsCreateOrUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will + /// be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; - var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/privateEndpointConnections/" - + privateEndpointConnectionName + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/snapshots/" + + global::System.Uri.EscapeDataString(resourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13249,31 +18022,34 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.PrivateEndpointConnectionsGetWithResult_Call (request, eventListener,sender); + return await this.SnapshotsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// - /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - /// - /// The ID of the target subscription. + /// update a snapshot. + /// 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 private endpoint connection. + /// The snapshot to create or update. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will + /// be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetWithResult(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13283,10 +18059,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/snapshots/" + global::System.Uri.EscapeDataString(resourceName) - + "/privateEndpointConnections/" - + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13295,26 +18069,28 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.PrivateEndpointConnectionsGetWithResult_Call (request, eventListener,sender); + return await this.SnapshotsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will + /// be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -13333,20 +18109,26 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -13358,17 +18140,203 @@ public partial class Aks } finally { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// 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 snapshot to create or update. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a snapshot. + /// 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. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SnapshotsDelete(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/snapshots/" + + global::System.Uri.EscapeDataString(resourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SnapshotsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a snapshot. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SnapshotsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/snapshots/" + + resourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SnapshotsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -13376,7 +18344,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SnapshotsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -13395,13 +18363,19 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -13417,23 +18391,22 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// The ID of the target 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 name of the private endpoint connection. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SnapshotsDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -13441,14 +18414,11 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); } } - /// - /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - /// - /// The ID of the target subscription. + /// Gets a snapshot. + /// 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. /// a delegate that is called when the remote service returns 200 (OK). @@ -13459,9 +18429,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsGet(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13471,9 +18441,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/snapshots/" + global::System.Uri.EscapeDataString(resourceName) - + "/privateEndpointConnections" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13487,13 +18456,11 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsList_Call (request, onOk,onDefault,eventListener,sender); + await this.SnapshotsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - /// + /// Gets a snapshot. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -13503,18 +18470,18 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateEndpointConnections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'"); } // replace URI parameters with values from identity @@ -13527,9 +18494,8 @@ public partial class Aks + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/snapshots/" + resourceName - + "/privateEndpointConnections" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13543,32 +18509,30 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsList_Call (request, onOk,onDefault,eventListener,sender); + await this.SnapshotsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - /// + /// Gets a snapshot. /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will + /// be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateEndpointConnections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'"); } // replace URI parameters with values from identity @@ -13581,9 +18545,8 @@ public partial class Aks + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/snapshots/" + resourceName - + "/privateEndpointConnections" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13597,25 +18560,23 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.PrivateEndpointConnectionsListWithResult_Call (request, eventListener,sender); + return await this.SnapshotsGetWithResult_Call (request, eventListener,sender); } } - /// - /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - /// - /// The ID of the target subscription. + /// Gets a snapshot. + /// 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. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will + /// be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsGetWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13625,9 +18586,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/snapshots/" + global::System.Uri.EscapeDataString(resourceName) - + "/privateEndpointConnections" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13641,21 +18601,19 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.PrivateEndpointConnectionsListWithResult_Call (request, eventListener,sender); + return await this.SnapshotsGetWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will + /// be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SnapshotsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -13674,20 +18632,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -13707,7 +18665,7 @@ public partial class Aks } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -13717,7 +18675,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SnapshotsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -13736,13 +18694,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -13758,22 +18716,22 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// The ID of the target 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. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SnapshotsGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -13784,24 +18742,19 @@ public partial class Aks } } - /// update a private endpoint connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// The name of the private endpoint connection. - /// The updated private endpoint connection. + /// Gets a list of snapshots in the specified subscription. + /// The ID of the target subscription. The value must be an UUID. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdate(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task SnapshotsList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13809,12 +18762,7 @@ public partial class Aks var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/privateEndpointConnections/" - + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "/providers/Microsoft.ContainerService/snapshots" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13823,60 +18771,39 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.SnapshotsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// update a private endpoint connection. - /// - /// The updated private endpoint connection. + /// Lists snapshots 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. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task SnapshotsListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; - var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/privateEndpointConnections/" - + privateEndpointConnectionName + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/snapshots" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13885,85 +18812,17 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.SnapshotsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); } } - /// update a private endpoint connection. + /// Lists snapshots in the specified subscription and resource group. /// - /// The updated private endpoint connection. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; - var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/privateEndpointConnections/" - + privateEndpointConnectionName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.PrivateEndpointConnectionsUpdateWithResult_Call (request, eventListener,sender); - } - } - - /// update a private endpoint connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// The name of the private endpoint connection. - /// Json string supplied to the PrivateEndpointConnectionsUpdate operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -13972,22 +18831,30 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/privateEndpointConnections/" - + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + resourceGroupName + + "/providers/Microsoft.ContainerService/snapshots" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13996,47 +18863,47 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.SnapshotsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); } } - /// update a private endpoint connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// The name of the private endpoint connection. - /// Json string supplied to the PrivateEndpointConnectionsUpdate operation + /// Lists snapshots in the specified subscription and resource group. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/privateEndpointConnections/" - + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + resourceGroupName + + "/providers/Microsoft.ContainerService/snapshots" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14045,35 +18912,27 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.PrivateEndpointConnectionsUpdateWithResult_Call (request, eventListener,sender); + return await this.SnapshotsListByResourceGroupWithResult_Call (request, eventListener,sender); } } - /// update a private endpoint connection. - /// The ID of the target subscription. + /// Lists snapshots 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 private endpoint connection. - /// The updated private endpoint connection. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdateWithResult(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task SnapshotsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14083,10 +18942,7 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/privateEndpointConnections/" - + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "/providers/Microsoft.ContainerService/snapshots" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14095,30 +18951,26 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.PrivateEndpointConnectionsUpdateWithResult_Call (request, eventListener,sender); + return await this.SnapshotsListByResourceGroupWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SnapshotsListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -14137,20 +18989,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SnapshotListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -14170,7 +19022,7 @@ public partial class Aks } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -14180,7 +19032,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SnapshotsListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -14199,13 +19051,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SnapshotListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -14221,86 +19073,28 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// The ID of the target 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 name of the private endpoint connection. - /// The updated private endpoint connection. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SnapshotsListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(resourceName),resourceName); - await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); - await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); - await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// - /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task PrivateLinkResourcesList(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/privateLinkResources" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.PrivateLinkResourcesList_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - /// + /// Gets a list of snapshots in the specified subscription. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -14310,33 +19104,27 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateLinkResourcesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateLinkResources$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/snapshots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/privateLinkResources" + + "/providers/Microsoft.ContainerService/snapshots" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14350,47 +19138,39 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateLinkResourcesList_Call (request, onOk,onDefault,eventListener,sender); + await this.SnapshotsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - /// + /// Gets a list of snapshots in the specified subscription. /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateLinkResourcesListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/privateLinkResources$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/snapshots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName - + "/privateLinkResources" + + "/providers/Microsoft.ContainerService/snapshots" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14404,25 +19184,21 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.PrivateLinkResourcesListWithResult_Call (request, eventListener,sender); + return await this.SnapshotsListWithResult_Call (request, eventListener,sender); } } - /// - /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. + /// Gets a list of snapshots in the specified subscription. + /// The ID of the target subscription. The value must be an UUID. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateLinkResourcesListWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsListWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14430,11 +19206,7 @@ public partial class Aks var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" - + global::System.Uri.EscapeDataString(resourceName) - + "/privateLinkResources" + + "/providers/Microsoft.ContainerService/snapshots" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14448,19 +19220,19 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.PrivateLinkResourcesListWithResult_Call (request, eventListener,sender); + return await this.SnapshotsListWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateLinkResourcesListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SnapshotsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -14479,20 +19251,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkResourcesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SnapshotListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -14512,7 +19284,7 @@ public partial class Aks } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -14522,7 +19294,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateLinkResourcesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SnapshotsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -14541,13 +19313,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkResourcesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SnapshotListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -14563,37 +19335,28 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. + /// The ID of the target subscription. The value must be an UUID. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateLinkResourcesList_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SnapshotsList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(resourceName),resourceName); - await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); - await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); - await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); } } - /// Gets the private link service ID for the specified managed cluster. - /// The ID of the target subscription. + /// update tags on a snapshot. + /// 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 required in order to resolve a private link service ID. + /// Parameters supplied to the Update snapshot Tags operation. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -14603,9 +19366,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPost(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task SnapshotsUpdateTags(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14615,9 +19378,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/snapshots/" + global::System.Uri.EscapeDataString(resourceName) - + "/resolvePrivateLinkServiceId" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14626,7 +19388,7 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -14635,13 +19397,13 @@ public partial class Aks request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ResolvePrivateLinkServiceIdPost_Call (request, onOk,onDefault,eventListener,sender); + await this.SnapshotsUpdateTags_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets the private link service ID for the specified managed cluster. + /// update tags on a snapshot. /// - /// Parameters required in order to resolve a private link service ID. + /// Parameters supplied to the Update snapshot Tags operation. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -14651,18 +19413,18 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPostViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task SnapshotsUpdateTagsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'"); } // replace URI parameters with values from identity @@ -14675,9 +19437,8 @@ public partial class Aks + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/snapshots/" + resourceName - + "/resolvePrivateLinkServiceId" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14686,7 +19447,7 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -14695,32 +19456,32 @@ public partial class Aks request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ResolvePrivateLinkServiceIdPost_Call (request, onOk,onDefault,eventListener,sender); + await this.SnapshotsUpdateTags_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets the private link service ID for the specified managed cluster. + /// update tags on a snapshot. /// - /// Parameters required in order to resolve a private link service ID. + /// Parameters supplied to the Update snapshot Tags operation. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will + /// be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPostViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkResource body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task SnapshotsUpdateTagsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'"); } // replace URI parameters with values from identity @@ -14733,9 +19494,8 @@ public partial class Aks + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/snapshots/" + resourceName - + "/resolvePrivateLinkServiceId" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14744,7 +19504,7 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } @@ -14753,15 +19513,15 @@ public partial class Aks request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ResolvePrivateLinkServiceIdPostWithResult_Call (request, eventListener,sender); + return await this.SnapshotsUpdateTagsWithResult_Call (request, eventListener,sender); } } - /// Gets the private link service ID for the specified managed cluster. - /// The ID of the target subscription. + /// update tags on a snapshot. + /// 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. - /// Json string supplied to the ResolvePrivateLinkServiceIdPost operation + /// Json string supplied to the SnapshotsUpdateTags operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -14770,9 +19530,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPostViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsUpdateTagsViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14782,9 +19542,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/snapshots/" + global::System.Uri.EscapeDataString(resourceName) - + "/resolvePrivateLinkServiceId" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14793,7 +19552,7 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -14802,24 +19561,24 @@ public partial class Aks request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ResolvePrivateLinkServiceIdPost_Call (request, onOk,onDefault,eventListener,sender); + await this.SnapshotsUpdateTags_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets the private link service ID for the specified managed cluster. - /// The ID of the target subscription. + /// update tags on a snapshot. + /// 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. - /// Json string supplied to the ResolvePrivateLinkServiceIdPost operation + /// Json string supplied to the SnapshotsUpdateTags operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will + /// be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPostViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SnapshotsUpdateTagsViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14829,9 +19588,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/snapshots/" + global::System.Uri.EscapeDataString(resourceName) - + "/resolvePrivateLinkServiceId" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14840,7 +19598,7 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } @@ -14849,25 +19607,25 @@ public partial class Aks request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ResolvePrivateLinkServiceIdPostWithResult_Call (request, eventListener,sender); + return await this.SnapshotsUpdateTagsWithResult_Call (request, eventListener,sender); } } - /// Gets the private link service ID for the specified managed cluster. - /// The ID of the target subscription. + /// update tags on a snapshot. + /// 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 required in order to resolve a private link service ID. + /// Parameters supplied to the Update snapshot Tags operation. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will + /// be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPostWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkResource body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task SnapshotsUpdateTagsWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14877,9 +19635,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/snapshots/" + global::System.Uri.EscapeDataString(resourceName) - + "/resolvePrivateLinkServiceId" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14888,7 +19645,7 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } @@ -14897,21 +19654,19 @@ public partial class Aks request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ResolvePrivateLinkServiceIdPostWithResult_Call (request, eventListener,sender); + return await this.SnapshotsUpdateTagsWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will + /// be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPostWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SnapshotsUpdateTagsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -14930,20 +19685,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -14963,7 +19718,7 @@ public partial class Aks } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -14973,7 +19728,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPost_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SnapshotsUpdateTags_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -14992,13 +19747,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -15014,23 +19769,23 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// The ID of the target 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. - /// Parameters required in order to resolve a private link service ID. + /// Parameters supplied to the Update snapshot Tags operation. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ResolvePrivateLinkServiceIdPost_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkResource body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SnapshotsUpdateTags_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -15043,13 +19798,13 @@ public partial class Aks } } - /// update a snapshot. - /// The ID of the target subscription. + /// update a trusted access role binding + /// 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 snapshot to create or update. + /// The name of trusted access role binding. + /// A trusted access role binding /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -15058,9 +19813,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, string trustedAccessRoleBindingName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15070,8 +19825,10 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/snapshots/" + + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) + + "/trustedAccessRoleBindings/" + + global::System.Uri.EscapeDataString(trustedAccessRoleBindingName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -15089,15 +19846,14 @@ public partial class Aks request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SnapshotsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); + await this.TrustedAccessRoleBindingsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// update a snapshot. + /// update a trusted access role binding /// - /// The snapshot to create or update. + /// A trusted access role binding /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -15106,32 +19862,35 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/trustedAccessRoleBindings/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var trustedAccessRoleBindingName = _match.Groups["trustedAccessRoleBindingName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ContainerService/snapshots/" + + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName + + "/trustedAccessRoleBindings/" + + trustedAccessRoleBindingName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -15149,46 +19908,49 @@ public partial class Aks request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SnapshotsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); + await this.TrustedAccessRoleBindingsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// update a snapshot. + /// update a trusted access role binding /// - /// The snapshot to create or update. + /// A trusted access role binding /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will - /// be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/trustedAccessRoleBindings/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var trustedAccessRoleBindingName = _match.Groups["trustedAccessRoleBindingName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ContainerService/snapshots/" + + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName + + "/trustedAccessRoleBindings/" + + trustedAccessRoleBindingName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -15206,17 +19968,17 @@ public partial class Aks request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.SnapshotsCreateOrUpdateWithResult_Call (request, eventListener,sender); + return await this.TrustedAccessRoleBindingsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// update a snapshot. - /// The ID of the target subscription. + /// update a trusted access role binding + /// 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. - /// Json string supplied to the SnapshotsCreateOrUpdate operation + /// The name of trusted access role binding. + /// Json string supplied to the TrustedAccessRoleBindingsCreateOrUpdate operation /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -15224,9 +19986,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, string trustedAccessRoleBindingName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15236,8 +19998,10 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/snapshots/" + + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) + + "/trustedAccessRoleBindings/" + + global::System.Uri.EscapeDataString(trustedAccessRoleBindingName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -15255,24 +20019,25 @@ public partial class Aks request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SnapshotsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); + await this.TrustedAccessRoleBindingsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// update a snapshot. - /// The ID of the target subscription. + /// update a trusted access role binding + /// 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. - /// Json string supplied to the SnapshotsCreateOrUpdate operation + /// The name of trusted access role binding. + /// Json string supplied to the TrustedAccessRoleBindingsCreateOrUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will - /// be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, string trustedAccessRoleBindingName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15282,8 +20047,10 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/snapshots/" + + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) + + "/trustedAccessRoleBindings/" + + global::System.Uri.EscapeDataString(trustedAccessRoleBindingName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -15301,25 +20068,26 @@ public partial class Aks request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.SnapshotsCreateOrUpdateWithResult_Call (request, eventListener,sender); + return await this.TrustedAccessRoleBindingsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// update a snapshot. - /// The ID of the target subscription. + /// update a trusted access role binding + /// 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 snapshot to create or update. + /// The name of trusted access role binding. + /// A trusted access role binding /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will - /// be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string resourceName, string trustedAccessRoleBindingName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15329,48 +20097,147 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/snapshots/" + + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) + + "/trustedAccessRoleBindings/" + + global::System.Uri.EscapeDataString(trustedAccessRoleBindingName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TrustedAccessRoleBindingsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.SnapshotsCreateOrUpdateWithResult_Call (request, eventListener,sender); - } - } + // drop the old response + _response?.Dispose(); - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will - /// be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -15379,26 +20246,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); - return await _result; - } - case global::System.Net.HttpStatusCode.Created: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBinding.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -15418,10 +20279,11 @@ public partial class Aks } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -15429,202 +20291,112 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); } - case global::System.Net.HttpStatusCode.Created: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// The snapshot to create or update. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(resourceName),resourceName); - await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); - await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); - await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// Deletes a snapshot. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task SnapshotsDelete(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/snapshots/" - + global::System.Uri.EscapeDataString(resourceName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.SnapshotsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); - } - } + // drop the old response + _response?.Dispose(); - /// Deletes a snapshot. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task SnapshotsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'"); - } + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/snapshots/" - + resourceName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.SnapshotsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); - } - } + // drop the old response + _response?.Dispose(); - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task SnapshotsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -15633,19 +20405,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBinding.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -15661,22 +20427,24 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. /// - /// The ID of the target 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 name of trusted access role binding. + /// A trusted access role binding /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SnapshotsDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, string trustedAccessRoleBindingName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -15684,13 +20452,21 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(trustedAccessRoleBindingName),trustedAccessRoleBindingName); + await eventListener.AssertMinimumLength(nameof(trustedAccessRoleBindingName),trustedAccessRoleBindingName,1); + await eventListener.AssertMaximumLength(nameof(trustedAccessRoleBindingName),trustedAccessRoleBindingName,24); + await eventListener.AssertRegEx(nameof(trustedAccessRoleBindingName), trustedAccessRoleBindingName, @"^([A-Za-z0-9-])+$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Gets a snapshot. - /// The ID of the target subscription. + /// Delete a trusted access role binding. + /// 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 trusted access role binding. + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -15699,9 +20475,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsGet(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsDelete(string subscriptionId, string resourceGroupName, string resourceName, string trustedAccessRoleBindingName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15711,8 +20487,10 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/snapshots/" + + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) + + "/trustedAccessRoleBindings/" + + global::System.Uri.EscapeDataString(trustedAccessRoleBindingName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -15721,17 +20499,18 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SnapshotsGet_Call (request, onOk,onDefault,eventListener,sender); + await this.TrustedAccessRoleBindingsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } - /// Gets a snapshot. + /// Delete a trusted access role binding. /// + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -15740,203 +20519,55 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/snapshots/" - + resourceName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.SnapshotsGet_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// Gets a snapshot. - /// - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will - /// be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task SnapshotsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/trustedAccessRoleBindings/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var resourceName = _match.Groups["resourceName"].Value; + var trustedAccessRoleBindingName = _match.Groups["trustedAccessRoleBindingName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/snapshots/" - + resourceName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.SnapshotsGetWithResult_Call (request, eventListener,sender); - } - } - - /// Gets a snapshot. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will - /// be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task SnapshotsGetWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/snapshots/" - + global::System.Uri.EscapeDataString(resourceName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.SnapshotsGetWithResult_Call (request, eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will - /// be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task SnapshotsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); - return await _result; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); - // Error Response : default - var code = (await _result)?.Code; - var message = (await _result)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); - throw ex; - } - else - { - throw new global::System.Exception($"[{code}] : {message}"); - } - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/trustedAccessRoleBindings/" + + trustedAccessRoleBindingName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TrustedAccessRoleBindingsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -15945,17 +20576,113 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SnapshotsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -15964,13 +20691,19 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -15986,22 +20719,23 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// The ID of the target 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 name of trusted access role binding. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SnapshotsGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, string trustedAccessRoleBindingName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -16009,50 +20743,18 @@ public partial class Aks await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(trustedAccessRoleBindingName),trustedAccessRoleBindingName); + await eventListener.AssertMinimumLength(nameof(trustedAccessRoleBindingName),trustedAccessRoleBindingName,1); + await eventListener.AssertMaximumLength(nameof(trustedAccessRoleBindingName),trustedAccessRoleBindingName,24); + await eventListener.AssertRegEx(nameof(trustedAccessRoleBindingName), trustedAccessRoleBindingName, @"^([A-Za-z0-9-])+$"); } } - /// Gets a list of snapshots in the specified subscription. - /// The ID of the target subscription. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task SnapshotsList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.ContainerService/snapshots" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.SnapshotsList_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// Lists snapshots in the specified subscription and resource group. - /// The ID of the target subscription. + /// Get a trusted access role binding. + /// 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 trusted access role binding. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -16061,9 +20763,9 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsGet(string subscriptionId, string resourceGroupName, string resourceName, string trustedAccessRoleBindingName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16073,7 +20775,10 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/snapshots" + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/trustedAccessRoleBindings/" + + global::System.Uri.EscapeDataString(trustedAccessRoleBindingName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16087,11 +20792,11 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SnapshotsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + await this.TrustedAccessRoleBindingsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists snapshots in the specified subscription and resource group. + /// Get a trusted access role binding. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -16101,30 +20806,35 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/trustedAccessRoleBindings/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + var trustedAccessRoleBindingName = _match.Groups["trustedAccessRoleBindingName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ContainerService/snapshots" + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/trustedAccessRoleBindings/" + + trustedAccessRoleBindingName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16138,42 +20848,47 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SnapshotsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + await this.TrustedAccessRoleBindingsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists snapshots in the specified subscription and resource group. + /// Get a trusted access role binding. /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A - /// that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/trustedAccessRoleBindings/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + var trustedAccessRoleBindingName = _match.Groups["trustedAccessRoleBindingName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ContainerService/snapshots" + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/trustedAccessRoleBindings/" + + trustedAccessRoleBindingName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16187,22 +20902,24 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.SnapshotsListByResourceGroupWithResult_Call (request, eventListener,sender); + return await this.TrustedAccessRoleBindingsGetWithResult_Call (request, eventListener,sender); } } - /// Lists snapshots in the specified subscription and resource group. - /// The ID of the target subscription. + /// Get a trusted access role binding. + /// 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 trusted access role binding. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A - /// that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsGetWithResult(string subscriptionId, string resourceGroupName, string resourceName, string trustedAccessRoleBindingName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16212,7 +20929,10 @@ public partial class Aks + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/snapshots" + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/trustedAccessRoleBindings/" + + global::System.Uri.EscapeDataString(trustedAccessRoleBindingName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16226,21 +20946,21 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.SnapshotsListByResourceGroupWithResult_Call (request, eventListener,sender); + return await this.TrustedAccessRoleBindingsGetWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A - /// that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SnapshotsListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -16259,20 +20979,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SnapshotListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBinding.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -16292,7 +21012,7 @@ public partial class Aks } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -16302,7 +21022,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SnapshotsListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -16321,13 +21041,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SnapshotListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBinding.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -16343,28 +21063,82 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will + /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// - /// The ID of the target 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 name of trusted access role binding. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SnapshotsListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, string trustedAccessRoleBindingName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(trustedAccessRoleBindingName),trustedAccessRoleBindingName); + await eventListener.AssertMinimumLength(nameof(trustedAccessRoleBindingName),trustedAccessRoleBindingName,1); + await eventListener.AssertMaximumLength(nameof(trustedAccessRoleBindingName),trustedAccessRoleBindingName,24); + await eventListener.AssertRegEx(nameof(trustedAccessRoleBindingName), trustedAccessRoleBindingName, @"^([A-Za-z0-9-])+$"); } } - /// Gets a list of snapshots in the specified subscription. + /// List trusted access role bindings. + /// 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. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsList(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/trustedAccessRoleBindings" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TrustedAccessRoleBindingsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List trusted access role bindings. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -16374,27 +21148,33 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/snapshots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/trustedAccessRoleBindings$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.ContainerService/snapshots" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/trustedAccessRoleBindings" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16408,39 +21188,45 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SnapshotsList_Call (request, onOk,onDefault,eventListener,sender); + await this.TrustedAccessRoleBindingsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets a list of snapshots in the specified subscription. + /// List trusted access role bindings. /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A - /// that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/snapshots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/managedClusters/(?[^/]+)/trustedAccessRoleBindings$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.ContainerService/snapshots" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/trustedAccessRoleBindings" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16454,21 +21240,23 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.SnapshotsListWithResult_Call (request, eventListener,sender); + return await this.TrustedAccessRoleBindingsListWithResult_Call (request, eventListener,sender); } } - /// Gets a list of snapshots in the specified subscription. - /// The ID of the target subscription. + /// List trusted access role bindings. + /// 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. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A - /// that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsListWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsListWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16476,7 +21264,11 @@ public partial class Aks var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.ContainerService/snapshots" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedClusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/trustedAccessRoleBindings" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16490,19 +21282,21 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.SnapshotsListWithResult_Call (request, eventListener,sender); + return await this.TrustedAccessRoleBindingsListWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A - /// that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SnapshotsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -16521,20 +21315,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SnapshotListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBindingListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -16554,7 +21348,7 @@ public partial class Aks } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -16564,7 +21358,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SnapshotsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -16583,13 +21377,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SnapshotListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBindingListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -16605,40 +21399,46 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// The ID of the target 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. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SnapshotsList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TrustedAccessRoleBindingsList_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); + await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); + await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - /// update tags on a snapshot. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// Parameters supplied to the Update snapshot Tags operation. + /// List supported trusted access roles. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsUpdateTags(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task TrustedAccessRolesList(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16646,10 +21446,9 @@ public partial class Aks var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/snapshots/" - + global::System.Uri.EscapeDataString(resourceName) + + "/providers/Microsoft.ContainerService/locations/" + + global::System.Uri.EscapeDataString(location) + + "/trustedAccessRoles" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16658,57 +21457,49 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SnapshotsUpdateTags_Call (request, onOk,onDefault,eventListener,sender); + await this.TrustedAccessRolesList_Call (request, onOk,onDefault,eventListener,sender); } } - /// update tags on a snapshot. + /// List supported trusted access roles. /// - /// Parameters supplied to the Update snapshot Tags operation. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsUpdateTagsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task TrustedAccessRolesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/locations/(?[^/]+)/trustedAccessRoles$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; + var location = _match.Groups["location"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/snapshots/" - + resourceName + + "/providers/Microsoft.ContainerService/locations/" + + location + + "/trustedAccessRoles" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16717,149 +21508,47 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SnapshotsUpdateTags_Call (request, onOk,onDefault,eventListener,sender); + await this.TrustedAccessRolesList_Call (request, onOk,onDefault,eventListener,sender); } } - /// update tags on a snapshot. + /// List supported trusted access roles. /// - /// Parameters supplied to the Update snapshot Tags operation. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will - /// be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsUpdateTagsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task TrustedAccessRolesListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ContainerService/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ContainerService/locations/(?[^/]+)/trustedAccessRoles$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; + var location = _match.Groups["location"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/snapshots/" - + resourceName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.SnapshotsUpdateTagsWithResult_Call (request, eventListener,sender); - } - } - - /// update tags on a snapshot. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// Json string supplied to the SnapshotsUpdateTags operation - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task SnapshotsUpdateTagsViaJsonString(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/snapshots/" - + global::System.Uri.EscapeDataString(resourceName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.SnapshotsUpdateTags_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// update tags on a snapshot. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// Json string supplied to the SnapshotsUpdateTags operation - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will - /// be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task SnapshotsUpdateTagsViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string resourceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-02-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/snapshots/" - + global::System.Uri.EscapeDataString(resourceName) + + "/providers/Microsoft.ContainerService/locations/" + + location + + "/trustedAccessRoles" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16868,34 +21557,27 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.SnapshotsUpdateTagsWithResult_Call (request, eventListener,sender); + return await this.TrustedAccessRolesListWithResult_Call (request, eventListener,sender); } } - /// update tags on a snapshot. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// Parameters supplied to the Update snapshot Tags operation. + /// List supported trusted access roles. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will - /// be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SnapshotsUpdateTagsWithResult(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task TrustedAccessRolesListWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2025-08-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16903,10 +21585,9 @@ public partial class Aks var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ContainerService/snapshots/" - + global::System.Uri.EscapeDataString(resourceName) + + "/providers/Microsoft.ContainerService/locations/" + + global::System.Uri.EscapeDataString(location) + + "/trustedAccessRoles" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16915,28 +21596,24 @@ public partial class Aks // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.SnapshotsUpdateTagsWithResult_Call (request, eventListener,sender); + return await this.TrustedAccessRolesListWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will - /// be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SnapshotsUpdateTagsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TrustedAccessRolesListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -16955,20 +21632,20 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) ); // Error Response : default var code = (await _result)?.Code; var message = (await _result)?.Message; if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(_response, await _result); throw ex; } else @@ -16988,7 +21665,7 @@ public partial class Aks } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -16998,7 +21675,7 @@ public partial class Aks /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SnapshotsUpdateTags_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TrustedAccessRolesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -17017,13 +21694,13 @@ public partial class Aks case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -17039,32 +21716,23 @@ public partial class Aks } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// Parameters supplied to the Update snapshot Tags operation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SnapshotsUpdateTags_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITagsObject body, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TrustedAccessRolesList_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(resourceName),resourceName); - await eventListener.AssertMinimumLength(nameof(resourceName),resourceName,1); - await eventListener.AssertMaximumLength(nameof(resourceName),resourceName,63); - await eventListener.AssertRegEx(nameof(resourceName), resourceName, @"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); } } } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AbsoluteMonthlySchedule.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AbsoluteMonthlySchedule.PowerShell.cs new file mode 100644 index 000000000000..a7189f6ba0ea --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AbsoluteMonthlySchedule.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + /// + [System.ComponentModel.TypeConverter(typeof(AbsoluteMonthlyScheduleTypeConverter))] + public partial class AbsoluteMonthlySchedule + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AbsoluteMonthlySchedule(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlyScheduleInternal)this).IntervalMonth = (int) content.GetValueForProperty("IntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlyScheduleInternal)this).IntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DayOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlyScheduleInternal)this).DayOfMonth = (int) content.GetValueForProperty("DayOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlyScheduleInternal)this).DayOfMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AbsoluteMonthlySchedule(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlyScheduleInternal)this).IntervalMonth = (int) content.GetValueForProperty("IntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlyScheduleInternal)this).IntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DayOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlyScheduleInternal)this).DayOfMonth = (int) content.GetValueForProperty("DayOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlyScheduleInternal)this).DayOfMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AbsoluteMonthlySchedule(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AbsoluteMonthlySchedule(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + [System.ComponentModel.TypeConverter(typeof(AbsoluteMonthlyScheduleTypeConverter))] + public partial interface IAbsoluteMonthlySchedule + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AbsoluteMonthlySchedule.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AbsoluteMonthlySchedule.TypeConverter.cs new file mode 100644 index 000000000000..e9d00656dd8f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AbsoluteMonthlySchedule.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AbsoluteMonthlyScheduleTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AbsoluteMonthlySchedule.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AbsoluteMonthlySchedule.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AbsoluteMonthlySchedule.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AbsoluteMonthlySchedule.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AbsoluteMonthlySchedule.cs new file mode 100644 index 000000000000..3401b1f7e2b5 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AbsoluteMonthlySchedule.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + /// + public partial class AbsoluteMonthlySchedule : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlyScheduleInternal + { + + /// Backing field for property. + private int _dayOfMonth; + + /// The date of the month. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int DayOfMonth { get => this._dayOfMonth; set => this._dayOfMonth = value; } + + /// Backing field for property. + private int _intervalMonth; + + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int IntervalMonth { get => this._intervalMonth; set => this._intervalMonth = value; } + + /// Creates an new instance. + public AbsoluteMonthlySchedule() + { + + } + } + /// For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + public partial interface IAbsoluteMonthlySchedule : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The date of the month. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The date of the month.", + SerializedName = @"dayOfMonth", + PossibleTypes = new [] { typeof(int) })] + int DayOfMonth { get; set; } + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + int IntervalMonth { get; set; } + + } + /// For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + internal partial interface IAbsoluteMonthlyScheduleInternal + + { + /// The date of the month. + int DayOfMonth { get; set; } + /// Specifies the number of months between each set of occurrences. + int IntervalMonth { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AbsoluteMonthlySchedule.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AbsoluteMonthlySchedule.json.cs new file mode 100644 index 000000000000..abaab7e1d3dc --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AbsoluteMonthlySchedule.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + /// + public partial class AbsoluteMonthlySchedule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal AbsoluteMonthlySchedule(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_intervalMonth = If( json?.PropertyT("intervalMonths"), out var __jsonIntervalMonths) ? (int)__jsonIntervalMonths : _intervalMonth;} + {_dayOfMonth = If( json?.PropertyT("dayOfMonth"), out var __jsonDayOfMonth) ? (int)__jsonDayOfMonth : _dayOfMonth;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AbsoluteMonthlySchedule(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber(this._intervalMonth), "intervalMonths" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber(this._dayOfMonth), "dayOfMonth" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworking.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworking.PowerShell.cs new file mode 100644 index 000000000000..af1f7a90cf15 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworking.PowerShell.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// Advanced Networking profile for enabling observability and security feature suite on a cluster. For more information see + /// aka.ms/aksadvancednetworking. + /// + [System.ComponentModel.TypeConverter(typeof(AdvancedNetworkingTypeConverter))] + public partial class AdvancedNetworking + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AdvancedNetworking(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Observability")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).Observability = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability) content.GetValueForProperty("Observability",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).Observability, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingObservabilityTypeConverter.ConvertFrom); + } + if (content.Contains("Security")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).Security = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity) content.GetValueForProperty("Security",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).Security, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingSecurityTypeConverter.ConvertFrom); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ObservabilityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).ObservabilityEnabled = (bool?) content.GetValueForProperty("ObservabilityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).ObservabilityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).SecurityEnabled = (bool?) content.GetValueForProperty("SecurityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).SecurityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityAdvancedNetworkPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).SecurityAdvancedNetworkPolicy = (string) content.GetValueForProperty("SecurityAdvancedNetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).SecurityAdvancedNetworkPolicy, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AdvancedNetworking(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Observability")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).Observability = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability) content.GetValueForProperty("Observability",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).Observability, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingObservabilityTypeConverter.ConvertFrom); + } + if (content.Contains("Security")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).Security = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity) content.GetValueForProperty("Security",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).Security, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingSecurityTypeConverter.ConvertFrom); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ObservabilityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).ObservabilityEnabled = (bool?) content.GetValueForProperty("ObservabilityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).ObservabilityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).SecurityEnabled = (bool?) content.GetValueForProperty("SecurityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).SecurityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityAdvancedNetworkPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).SecurityAdvancedNetworkPolicy = (string) content.GetValueForProperty("SecurityAdvancedNetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)this).SecurityAdvancedNetworkPolicy, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AdvancedNetworking(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AdvancedNetworking(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Advanced Networking profile for enabling observability and security feature suite on a cluster. For more information see + /// aka.ms/aksadvancednetworking. + [System.ComponentModel.TypeConverter(typeof(AdvancedNetworkingTypeConverter))] + public partial interface IAdvancedNetworking + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworking.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworking.TypeConverter.cs new file mode 100644 index 000000000000..c5d2d0af0570 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworking.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AdvancedNetworkingTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AdvancedNetworking.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AdvancedNetworking.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AdvancedNetworking.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworking.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworking.cs new file mode 100644 index 000000000000..a490bc58a914 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworking.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Advanced Networking profile for enabling observability and security feature suite on a cluster. For more information see + /// aka.ms/aksadvancednetworking. + /// + public partial class AdvancedNetworking : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// + /// Indicates the enablement of Advanced Networking functionalities of observability and security on AKS clusters. When this + /// is set to true, all observability and security features will be set to enabled unless explicitly disabled. If not specified, + /// the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? Enabled { get => this._enabled; set => this._enabled = value; } + + /// Internal Acessors for Observability + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal.Observability { get => (this._observability = this._observability ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingObservability()); set { {_observability = value;} } } + + /// Internal Acessors for Security + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal.Security { get => (this._security = this._security ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingSecurity()); set { {_security = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability _observability; + + /// + /// Observability profile to enable advanced network metrics and flow logs with historical contexts. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability Observability { get => (this._observability = this._observability ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingObservability()); set => this._observability = value; } + + /// + /// Indicates the enablement of Advanced Networking observability functionalities on clusters. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? ObservabilityEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservabilityInternal)Observability).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservabilityInternal)Observability).Enabled = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity _security; + + /// Security profile to enable security features on cilium based cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity Security { get => (this._security = this._security ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingSecurity()); set => this._security = value; } + + /// + /// Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies + /// themselves must be configured via the Cilium Network Policy resources, see https://docs.cilium.io/en/latest/security/policy/index.html. + /// This can be enabled only on cilium-based clusters. If not specified, the default value is FQDN if security.enabled is + /// set to true. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string SecurityAdvancedNetworkPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurityInternal)Security).AdvancedNetworkPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurityInternal)Security).AdvancedNetworkPolicy = value ?? null; } + + /// + /// This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based + /// clusters. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? SecurityEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurityInternal)Security).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurityInternal)Security).Enabled = value ?? default(bool); } + + /// Creates an new instance. + public AdvancedNetworking() + { + + } + } + /// Advanced Networking profile for enabling observability and security feature suite on a cluster. For more information see + /// aka.ms/aksadvancednetworking. + public partial interface IAdvancedNetworking : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// Indicates the enablement of Advanced Networking functionalities of observability and security on AKS clusters. When this + /// is set to true, all observability and security features will be set to enabled unless explicitly disabled. If not specified, + /// the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates the enablement of Advanced Networking functionalities of observability and security on AKS clusters. When this is set to true, all observability and security features will be set to enabled unless explicitly disabled. If not specified, the default is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + /// + /// Indicates the enablement of Advanced Networking observability functionalities on clusters. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates the enablement of Advanced Networking observability functionalities on clusters.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? ObservabilityEnabled { get; set; } + /// + /// Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies + /// themselves must be configured via the Cilium Network Policy resources, see https://docs.cilium.io/en/latest/security/policy/index.html. + /// This can be enabled only on cilium-based clusters. If not specified, the default value is FQDN if security.enabled is + /// set to true. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies themselves must be configured via the Cilium Network Policy resources, see https://docs.cilium.io/en/latest/security/policy/index.html. This can be enabled only on cilium-based clusters. If not specified, the default value is FQDN if security.enabled is set to true.", + SerializedName = @"advancedNetworkPolicies", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("L7", "FQDN", "None")] + string SecurityAdvancedNetworkPolicy { get; set; } + /// + /// This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based + /// clusters. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based clusters. If not specified, the default is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityEnabled { get; set; } + + } + /// Advanced Networking profile for enabling observability and security feature suite on a cluster. For more information see + /// aka.ms/aksadvancednetworking. + internal partial interface IAdvancedNetworkingInternal + + { + /// + /// Indicates the enablement of Advanced Networking functionalities of observability and security on AKS clusters. When this + /// is set to true, all observability and security features will be set to enabled unless explicitly disabled. If not specified, + /// the default is false. + /// + bool? Enabled { get; set; } + /// + /// Observability profile to enable advanced network metrics and flow logs with historical contexts. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability Observability { get; set; } + /// + /// Indicates the enablement of Advanced Networking observability functionalities on clusters. + /// + bool? ObservabilityEnabled { get; set; } + /// Security profile to enable security features on cilium based cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity Security { get; set; } + /// + /// Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies + /// themselves must be configured via the Cilium Network Policy resources, see https://docs.cilium.io/en/latest/security/policy/index.html. + /// This can be enabled only on cilium-based clusters. If not specified, the default value is FQDN if security.enabled is + /// set to true. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("L7", "FQDN", "None")] + string SecurityAdvancedNetworkPolicy { get; set; } + /// + /// This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based + /// clusters. If not specified, the default is false. + /// + bool? SecurityEnabled { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworking.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworking.json.cs new file mode 100644 index 000000000000..3e5941b48a5a --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworking.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Advanced Networking profile for enabling observability and security feature suite on a cluster. For more information see + /// aka.ms/aksadvancednetworking. + /// + public partial class AdvancedNetworking + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal AdvancedNetworking(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_observability = If( json?.PropertyT("observability"), out var __jsonObservability) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingObservability.FromJson(__jsonObservability) : _observability;} + {_security = If( json?.PropertyT("security"), out var __jsonSecurity) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingSecurity.FromJson(__jsonSecurity) : _security;} + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : _enabled;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AdvancedNetworking(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._observability ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._observability.ToJson(null,serializationMode) : null, "observability" ,container.Add ); + AddIf( null != this._security ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._security.ToJson(null,serializationMode) : null, "security" ,container.Add ); + AddIf( null != this._enabled ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enabled) : null, "enabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingObservability.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingObservability.PowerShell.cs new file mode 100644 index 000000000000..6a373bd906ac --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingObservability.PowerShell.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// Observability profile to enable advanced network metrics and flow logs with historical contexts. + /// + [System.ComponentModel.TypeConverter(typeof(AdvancedNetworkingObservabilityTypeConverter))] + public partial class AdvancedNetworkingObservability + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AdvancedNetworkingObservability(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservabilityInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservabilityInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AdvancedNetworkingObservability(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservabilityInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservabilityInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AdvancedNetworkingObservability(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AdvancedNetworkingObservability(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Observability profile to enable advanced network metrics and flow logs with historical contexts. + [System.ComponentModel.TypeConverter(typeof(AdvancedNetworkingObservabilityTypeConverter))] + public partial interface IAdvancedNetworkingObservability + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingObservability.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingObservability.TypeConverter.cs new file mode 100644 index 000000000000..54c163b1d78c --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingObservability.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AdvancedNetworkingObservabilityTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AdvancedNetworkingObservability.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AdvancedNetworkingObservability.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AdvancedNetworkingObservability.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingObservability.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingObservability.cs new file mode 100644 index 000000000000..671135d66201 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingObservability.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Observability profile to enable advanced network metrics and flow logs with historical contexts. + /// + public partial class AdvancedNetworkingObservability : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservabilityInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// + /// Indicates the enablement of Advanced Networking observability functionalities on clusters. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? Enabled { get => this._enabled; set => this._enabled = value; } + + /// Creates an new instance. + public AdvancedNetworkingObservability() + { + + } + } + /// Observability profile to enable advanced network metrics and flow logs with historical contexts. + public partial interface IAdvancedNetworkingObservability : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// Indicates the enablement of Advanced Networking observability functionalities on clusters. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates the enablement of Advanced Networking observability functionalities on clusters.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + + } + /// Observability profile to enable advanced network metrics and flow logs with historical contexts. + internal partial interface IAdvancedNetworkingObservabilityInternal + + { + /// + /// Indicates the enablement of Advanced Networking observability functionalities on clusters. + /// + bool? Enabled { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingObservability.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingObservability.json.cs new file mode 100644 index 000000000000..b9367b600c30 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingObservability.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Observability profile to enable advanced network metrics and flow logs with historical contexts. + /// + public partial class AdvancedNetworkingObservability + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal AdvancedNetworkingObservability(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : _enabled;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AdvancedNetworkingObservability(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._enabled ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enabled) : null, "enabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingSecurity.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingSecurity.PowerShell.cs new file mode 100644 index 000000000000..ab51c39d6dcc --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingSecurity.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Security profile to enable security features on cilium based cluster. + [System.ComponentModel.TypeConverter(typeof(AdvancedNetworkingSecurityTypeConverter))] + public partial class AdvancedNetworkingSecurity + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AdvancedNetworkingSecurity(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurityInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurityInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AdvancedNetworkPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurityInternal)this).AdvancedNetworkPolicy = (string) content.GetValueForProperty("AdvancedNetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurityInternal)this).AdvancedNetworkPolicy, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AdvancedNetworkingSecurity(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurityInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurityInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AdvancedNetworkPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurityInternal)this).AdvancedNetworkPolicy = (string) content.GetValueForProperty("AdvancedNetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurityInternal)this).AdvancedNetworkPolicy, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AdvancedNetworkingSecurity(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AdvancedNetworkingSecurity(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Security profile to enable security features on cilium based cluster. + [System.ComponentModel.TypeConverter(typeof(AdvancedNetworkingSecurityTypeConverter))] + public partial interface IAdvancedNetworkingSecurity + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingSecurity.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingSecurity.TypeConverter.cs new file mode 100644 index 000000000000..ac0b161b1348 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingSecurity.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AdvancedNetworkingSecurityTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AdvancedNetworkingSecurity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AdvancedNetworkingSecurity.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AdvancedNetworkingSecurity.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingSecurity.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingSecurity.cs new file mode 100644 index 000000000000..b06c51a9044b --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingSecurity.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Security profile to enable security features on cilium based cluster. + public partial class AdvancedNetworkingSecurity : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurityInternal + { + + /// Backing field for property. + private string _advancedNetworkPolicy; + + /// + /// Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies + /// themselves must be configured via the Cilium Network Policy resources, see https://docs.cilium.io/en/latest/security/policy/index.html. + /// This can be enabled only on cilium-based clusters. If not specified, the default value is FQDN if security.enabled is + /// set to true. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string AdvancedNetworkPolicy { get => this._advancedNetworkPolicy; set => this._advancedNetworkPolicy = value; } + + /// Backing field for property. + private bool? _enabled; + + /// + /// This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based + /// clusters. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? Enabled { get => this._enabled; set => this._enabled = value; } + + /// Creates an new instance. + public AdvancedNetworkingSecurity() + { + + } + } + /// Security profile to enable security features on cilium based cluster. + public partial interface IAdvancedNetworkingSecurity : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies + /// themselves must be configured via the Cilium Network Policy resources, see https://docs.cilium.io/en/latest/security/policy/index.html. + /// This can be enabled only on cilium-based clusters. If not specified, the default value is FQDN if security.enabled is + /// set to true. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies themselves must be configured via the Cilium Network Policy resources, see https://docs.cilium.io/en/latest/security/policy/index.html. This can be enabled only on cilium-based clusters. If not specified, the default value is FQDN if security.enabled is set to true.", + SerializedName = @"advancedNetworkPolicies", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("L7", "FQDN", "None")] + string AdvancedNetworkPolicy { get; set; } + /// + /// This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based + /// clusters. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based clusters. If not specified, the default is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + + } + /// Security profile to enable security features on cilium based cluster. + internal partial interface IAdvancedNetworkingSecurityInternal + + { + /// + /// Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies + /// themselves must be configured via the Cilium Network Policy resources, see https://docs.cilium.io/en/latest/security/policy/index.html. + /// This can be enabled only on cilium-based clusters. If not specified, the default value is FQDN if security.enabled is + /// set to true. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("L7", "FQDN", "None")] + string AdvancedNetworkPolicy { get; set; } + /// + /// This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based + /// clusters. If not specified, the default is false. + /// + bool? Enabled { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingSecurity.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingSecurity.json.cs new file mode 100644 index 000000000000..b0befe9156c6 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AdvancedNetworkingSecurity.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Security profile to enable security features on cilium based cluster. + public partial class AdvancedNetworkingSecurity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal AdvancedNetworkingSecurity(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : _enabled;} + {_advancedNetworkPolicy = If( json?.PropertyT("advancedNetworkPolicies"), out var __jsonAdvancedNetworkPolicies) ? (string)__jsonAdvancedNetworkPolicies : (string)_advancedNetworkPolicy;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AdvancedNetworkingSecurity(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._enabled ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enabled) : null, "enabled" ,container.Add ); + AddIf( null != (((object)this._advancedNetworkPolicy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._advancedNetworkPolicy.ToString()) : null, "advancedNetworkPolicies" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPool.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPool.PowerShell.cs index c0067f1c3d0f..8d7222c46ef7 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPool.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPool.PowerShell.cs @@ -104,6 +104,10 @@ internal AgentPool(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CreationDataTypeConverter.ConvertFrom); } + if (content.Contains("GpuProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GpuProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile) content.GetValueForProperty("GpuProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GpuProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.GpuProfileTypeConverter.ConvertFrom); + } if (content.Contains("WorkloadRuntime")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).WorkloadRuntime = (string) content.GetValueForProperty("WorkloadRuntime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).WorkloadRuntime, global::System.Convert.ToString); @@ -120,6 +124,34 @@ internal AgentPool(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).LinuxOSConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ILinuxOSConfig) content.GetValueForProperty("LinuxOSConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).LinuxOSConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.LinuxOSConfigTypeConverter.ConvertFrom); } + if (content.Contains("NetworkProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolNetworkProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WindowsProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolWindowsProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("GatewayProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GatewayProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile) content.GetValueForProperty("GatewayProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GatewayProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolGatewayProfileTypeConverter.ConvertFrom); + } + if (content.Contains("VirtualMachinesProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VirtualMachinesProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile) content.GetValueForProperty("VirtualMachinesProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VirtualMachinesProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachinesProfileTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolStatusTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ETag, global::System.Convert.ToString); + } if (content.Contains("Count")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -140,6 +172,10 @@ internal AgentPool(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).KubeletDiskType = (string) content.GetValueForProperty("KubeletDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).KubeletDiskType, global::System.Convert.ToString); } + if (content.Contains("MessageOfTheDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).MessageOfTheDay = (string) content.GetValueForProperty("MessageOfTheDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).MessageOfTheDay, global::System.Convert.ToString); + } if (content.Contains("VnetSubnetId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VnetSubnetId, global::System.Convert.ToString); @@ -148,6 +184,10 @@ internal AgentPool(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).PodSubnetId = (string) content.GetValueForProperty("PodSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).PodSubnetId, global::System.Convert.ToString); } + if (content.Contains("PodIPAllocationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).PodIPAllocationMode = (string) content.GetValueForProperty("PodIPAllocationMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).PodIPAllocationMode, global::System.Convert.ToString); + } if (content.Contains("MaxPod")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -252,10 +292,18 @@ internal AgentPool(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GpuInstanceProfile = (string) content.GetValueForProperty("GpuInstanceProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GpuInstanceProfile, global::System.Convert.ToString); } + if (content.Contains("CapacityReservationGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).CapacityReservationGroupId = (string) content.GetValueForProperty("CapacityReservationGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).CapacityReservationGroupId, global::System.Convert.ToString); + } if (content.Contains("HostGroupId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).HostGroupId = (string) content.GetValueForProperty("HostGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).HostGroupId, global::System.Convert.ToString); } + if (content.Contains("VirtualMachineNodesStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VirtualMachineNodesStatus = (System.Collections.Generic.List) content.GetValueForProperty("VirtualMachineNodesStatus",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VirtualMachineNodesStatus, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachineNodesTypeConverter.ConvertFrom)); + } if (content.Contains("PowerStateCode")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).PowerStateCode = (string) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).PowerStateCode, global::System.Convert.ToString); @@ -264,6 +312,22 @@ internal AgentPool(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingMaxSurge, global::System.Convert.ToString); } + if (content.Contains("UpgradeSettingMaxUnavailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingMaxUnavailable = (string) content.GetValueForProperty("UpgradeSettingMaxUnavailable",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingMaxUnavailable, global::System.Convert.ToString); + } + if (content.Contains("UpgradeSettingDrainTimeoutInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingDrainTimeoutInMinute = (int?) content.GetValueForProperty("UpgradeSettingDrainTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingDrainTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UpgradeSettingNodeSoakDurationInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingNodeSoakDurationInMinute = (int?) content.GetValueForProperty("UpgradeSettingNodeSoakDurationInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingNodeSoakDurationInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UpgradeSettingUndrainableNodeBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingUndrainableNodeBehavior = (string) content.GetValueForProperty("UpgradeSettingUndrainableNodeBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingUndrainableNodeBehavior, global::System.Convert.ToString); + } if (content.Contains("KubeletConfigCpuManagerPolicy")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).KubeletConfigCpuManagerPolicy = (string) content.GetValueForProperty("KubeletConfigCpuManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).KubeletConfigCpuManagerPolicy, global::System.Convert.ToString); @@ -328,6 +392,74 @@ internal AgentPool(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).CreationDataSourceResourceId, global::System.Convert.ToString); } + if (content.Contains("NetworkProfileNodePublicIPTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfileNodePublicIPTag = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileNodePublicIPTag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfileNodePublicIPTag, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPTagTypeConverter.ConvertFrom)); + } + if (content.Contains("NetworkProfileAllowedHostPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfileAllowedHostPort = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileAllowedHostPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfileAllowedHostPort, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PortRangeTypeConverter.ConvertFrom)); + } + if (content.Contains("NetworkProfileApplicationSecurityGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfileApplicationSecurityGroup = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileApplicationSecurityGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfileApplicationSecurityGroup, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("WindowProfileDisableOutboundNat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).WindowProfileDisableOutboundNat = (bool?) content.GetValueForProperty("WindowProfileDisableOutboundNat",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).WindowProfileDisableOutboundNat, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileEnableVtpm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfileEnableVtpm = (bool?) content.GetValueForProperty("SecurityProfileEnableVtpm",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfileEnableVtpm, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileEnableSecureBoot")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfileEnableSecureBoot = (bool?) content.GetValueForProperty("SecurityProfileEnableSecureBoot",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfileEnableSecureBoot, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileSshAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfileSshAccess = (string) content.GetValueForProperty("SecurityProfileSshAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfileSshAccess, global::System.Convert.ToString); + } + if (content.Contains("GpuProfileDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GpuProfileDriver = (string) content.GetValueForProperty("GpuProfileDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GpuProfileDriver, global::System.Convert.ToString); + } + if (content.Contains("GatewayProfilePublicIPPrefixSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GatewayProfilePublicIPPrefixSize = (int?) content.GetValueForProperty("GatewayProfilePublicIPPrefixSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GatewayProfilePublicIPPrefixSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VirtualMachineProfileScale")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VirtualMachineProfileScale = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile) content.GetValueForProperty("VirtualMachineProfileScale",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VirtualMachineProfileScale, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScaleProfileTypeConverter.ConvertFrom); + } + if (content.Contains("StatusProvisioningError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).StatusProvisioningError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("StatusProvisioningError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).StatusProvisioningError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("ScaleManual")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ScaleManual = (System.Collections.Generic.List) content.GetValueForProperty("ScaleManual",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ScaleManual, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManualScaleProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorCode = (string) content.GetValueForProperty("ProvisioningErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorMessage = (string) content.GetValueForProperty("ProvisioningErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorTarget = (string) content.GetValueForProperty("ProvisioningErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorTarget, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorDetail = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } @@ -373,6 +505,10 @@ internal AgentPool(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CreationDataTypeConverter.ConvertFrom); } + if (content.Contains("GpuProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GpuProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile) content.GetValueForProperty("GpuProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GpuProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.GpuProfileTypeConverter.ConvertFrom); + } if (content.Contains("WorkloadRuntime")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).WorkloadRuntime = (string) content.GetValueForProperty("WorkloadRuntime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).WorkloadRuntime, global::System.Convert.ToString); @@ -389,6 +525,34 @@ internal AgentPool(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).LinuxOSConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ILinuxOSConfig) content.GetValueForProperty("LinuxOSConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).LinuxOSConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.LinuxOSConfigTypeConverter.ConvertFrom); } + if (content.Contains("NetworkProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolNetworkProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WindowsProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolWindowsProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("GatewayProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GatewayProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile) content.GetValueForProperty("GatewayProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GatewayProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolGatewayProfileTypeConverter.ConvertFrom); + } + if (content.Contains("VirtualMachinesProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VirtualMachinesProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile) content.GetValueForProperty("VirtualMachinesProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VirtualMachinesProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachinesProfileTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolStatusTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ETag, global::System.Convert.ToString); + } if (content.Contains("Count")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -409,6 +573,10 @@ internal AgentPool(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).KubeletDiskType = (string) content.GetValueForProperty("KubeletDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).KubeletDiskType, global::System.Convert.ToString); } + if (content.Contains("MessageOfTheDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).MessageOfTheDay = (string) content.GetValueForProperty("MessageOfTheDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).MessageOfTheDay, global::System.Convert.ToString); + } if (content.Contains("VnetSubnetId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VnetSubnetId, global::System.Convert.ToString); @@ -417,6 +585,10 @@ internal AgentPool(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).PodSubnetId = (string) content.GetValueForProperty("PodSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).PodSubnetId, global::System.Convert.ToString); } + if (content.Contains("PodIPAllocationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).PodIPAllocationMode = (string) content.GetValueForProperty("PodIPAllocationMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).PodIPAllocationMode, global::System.Convert.ToString); + } if (content.Contains("MaxPod")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -521,10 +693,18 @@ internal AgentPool(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GpuInstanceProfile = (string) content.GetValueForProperty("GpuInstanceProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GpuInstanceProfile, global::System.Convert.ToString); } + if (content.Contains("CapacityReservationGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).CapacityReservationGroupId = (string) content.GetValueForProperty("CapacityReservationGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).CapacityReservationGroupId, global::System.Convert.ToString); + } if (content.Contains("HostGroupId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).HostGroupId = (string) content.GetValueForProperty("HostGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).HostGroupId, global::System.Convert.ToString); } + if (content.Contains("VirtualMachineNodesStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VirtualMachineNodesStatus = (System.Collections.Generic.List) content.GetValueForProperty("VirtualMachineNodesStatus",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VirtualMachineNodesStatus, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachineNodesTypeConverter.ConvertFrom)); + } if (content.Contains("PowerStateCode")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).PowerStateCode = (string) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).PowerStateCode, global::System.Convert.ToString); @@ -533,6 +713,22 @@ internal AgentPool(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingMaxSurge, global::System.Convert.ToString); } + if (content.Contains("UpgradeSettingMaxUnavailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingMaxUnavailable = (string) content.GetValueForProperty("UpgradeSettingMaxUnavailable",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingMaxUnavailable, global::System.Convert.ToString); + } + if (content.Contains("UpgradeSettingDrainTimeoutInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingDrainTimeoutInMinute = (int?) content.GetValueForProperty("UpgradeSettingDrainTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingDrainTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UpgradeSettingNodeSoakDurationInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingNodeSoakDurationInMinute = (int?) content.GetValueForProperty("UpgradeSettingNodeSoakDurationInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingNodeSoakDurationInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UpgradeSettingUndrainableNodeBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingUndrainableNodeBehavior = (string) content.GetValueForProperty("UpgradeSettingUndrainableNodeBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).UpgradeSettingUndrainableNodeBehavior, global::System.Convert.ToString); + } if (content.Contains("KubeletConfigCpuManagerPolicy")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).KubeletConfigCpuManagerPolicy = (string) content.GetValueForProperty("KubeletConfigCpuManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).KubeletConfigCpuManagerPolicy, global::System.Convert.ToString); @@ -597,6 +793,74 @@ internal AgentPool(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).CreationDataSourceResourceId, global::System.Convert.ToString); } + if (content.Contains("NetworkProfileNodePublicIPTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfileNodePublicIPTag = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileNodePublicIPTag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfileNodePublicIPTag, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPTagTypeConverter.ConvertFrom)); + } + if (content.Contains("NetworkProfileAllowedHostPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfileAllowedHostPort = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileAllowedHostPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfileAllowedHostPort, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PortRangeTypeConverter.ConvertFrom)); + } + if (content.Contains("NetworkProfileApplicationSecurityGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfileApplicationSecurityGroup = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileApplicationSecurityGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).NetworkProfileApplicationSecurityGroup, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("WindowProfileDisableOutboundNat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).WindowProfileDisableOutboundNat = (bool?) content.GetValueForProperty("WindowProfileDisableOutboundNat",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).WindowProfileDisableOutboundNat, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileEnableVtpm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfileEnableVtpm = (bool?) content.GetValueForProperty("SecurityProfileEnableVtpm",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfileEnableVtpm, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileEnableSecureBoot")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfileEnableSecureBoot = (bool?) content.GetValueForProperty("SecurityProfileEnableSecureBoot",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfileEnableSecureBoot, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileSshAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfileSshAccess = (string) content.GetValueForProperty("SecurityProfileSshAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).SecurityProfileSshAccess, global::System.Convert.ToString); + } + if (content.Contains("GpuProfileDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GpuProfileDriver = (string) content.GetValueForProperty("GpuProfileDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GpuProfileDriver, global::System.Convert.ToString); + } + if (content.Contains("GatewayProfilePublicIPPrefixSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GatewayProfilePublicIPPrefixSize = (int?) content.GetValueForProperty("GatewayProfilePublicIPPrefixSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).GatewayProfilePublicIPPrefixSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VirtualMachineProfileScale")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VirtualMachineProfileScale = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile) content.GetValueForProperty("VirtualMachineProfileScale",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).VirtualMachineProfileScale, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScaleProfileTypeConverter.ConvertFrom); + } + if (content.Contains("StatusProvisioningError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).StatusProvisioningError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("StatusProvisioningError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).StatusProvisioningError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("ScaleManual")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ScaleManual = (System.Collections.Generic.List) content.GetValueForProperty("ScaleManual",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ScaleManual, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManualScaleProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorCode = (string) content.GetValueForProperty("ProvisioningErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorMessage = (string) content.GetValueForProperty("ProvisioningErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorTarget = (string) content.GetValueForProperty("ProvisioningErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorTarget, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorDetail = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal)this).ProvisioningErrorAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPool.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPool.cs index 2e6edebf7c53..ee2be204a5a5 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPool.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPool.cs @@ -24,6 +24,12 @@ public partial class AgentPool : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public System.Collections.Generic.List AvailabilityZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).AvailabilityZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).AvailabilityZone = value ?? null /* arrayOf */; } + /// + /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string CapacityReservationGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CapacityReservationGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CapacityReservationGroupId = value ?? null; } + /// /// 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. @@ -36,33 +42,43 @@ public partial class AgentPool : public string CreationDataSourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CreationDataSourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CreationDataSourceResourceId = value ?? null; } /// - /// If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion - /// is , this field will contain the full version being used. + /// The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version , + /// this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full + /// version being used. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string CurrentOrchestratorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CurrentOrchestratorVersion; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ETag; } + /// Whether to enable auto-scaler [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? EnableAutoScaling { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableAutoScaling; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableAutoScaling = value ?? default(bool); } /// - /// This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption + /// Whether to enable host based OS and data drive encryption. This is only supported on certain VM sizes and in certain Azure + /// regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? EnableEncryptionAtHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableEncryptionAtHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableEncryptionAtHost = value ?? default(bool); } /// - /// See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + /// Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) /// for more details. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? EnableFips { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableFips; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableFips = value ?? default(bool); } /// - /// Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario - /// is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. - /// For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + /// Whether each node is allocated its own public IP. Some scenarios may require nodes in a node pool to receive their own + /// dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection + /// to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). /// The default is false. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] @@ -72,14 +88,29 @@ public partial class AgentPool : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? EnableUltraSsd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableUltraSsd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableUltraSsd = value ?? default(bool); } + /// + /// The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size + /// of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. + /// The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, + /// the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default + /// value is 31. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? GatewayProfilePublicIPPrefixSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).GatewayProfilePublicIPPrefixSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).GatewayProfilePublicIPPrefixSize = value ?? default(int); } + /// /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string GpuInstanceProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).GpuInstanceProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).GpuInstanceProfile = value ?? null; } + /// Whether to install GPU drivers. When it's not specified, default is Install. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string GpuProfileDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).GpuProfileDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).GpuProfileDriver = value ?? null; } + /// - /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// The fully qualified resource ID of the Dedicated Host Group to provision virtual machines from, used only in creation + /// scenario and not allowed to changed once set. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. /// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] @@ -103,19 +134,21 @@ public partial class AgentPool : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public int? KubeletConfigContainerLogMaxSizeMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigContainerLogMaxSizeMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigContainerLogMaxSizeMb = value ?? default(int); } - /// The default is true. + /// + /// If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? KubeletConfigCpuCfsQuota { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigCpuCfsQuota; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigCpuCfsQuota = value ?? default(bool); } /// - /// The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For - /// example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + /// The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an optional + /// fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string KubeletConfigCpuCfsQuotaPeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigCpuCfsQuotaPeriod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigCpuCfsQuotaPeriod = value ?? null; } /// - /// The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + /// The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) /// for more information. Allowed values are 'none' and 'static'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] @@ -127,11 +160,17 @@ public partial class AgentPool : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? KubeletConfigFailSwapOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigFailSwapOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigFailSwapOn = value ?? default(bool); } - /// To disable image garbage collection, set to 100. The default is 85% + /// + /// The percent of disk usage after which image garbage collection is always run. To disable image garbage collection, set + /// to 100. The default is 85% + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public int? KubeletConfigImageGcHighThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigImageGcHighThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigImageGcHighThreshold = value ?? default(int); } - /// This cannot be set higher than imageGcHighThreshold. The default is 80% + /// + /// The percent of disk usage before which image garbage collection is never run. This cannot be set higher than imageGcHighThreshold. + /// The default is 80% + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public int? KubeletConfigImageGcLowThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigImageGcLowThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigImageGcLowThreshold = value ?? default(int); } @@ -140,7 +179,7 @@ public partial class AgentPool : public int? KubeletConfigPodMaxPid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigPodMaxPid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigPodMaxPid = value ?? default(int); } /// - /// For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). + /// The Topology Manager policy to use. For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). /// The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] @@ -161,14 +200,16 @@ public partial class AgentPool : public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISysctlConfig LinuxOSConfigSysctl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfigSysctl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfigSysctl = value ?? null /* model class */; } /// - /// Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information - /// see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values are + /// 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent + /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string LinuxOSConfigTransparentHugePageDefrag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfigTransparentHugePageDefrag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfigTransparentHugePageDefrag = value ?? null; } /// - /// Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is 'always'. + /// For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string LinuxOSConfigTransparentHugePageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfigTransparentHugePageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfigTransparentHugePageEnabled = value ?? null; } @@ -181,49 +222,102 @@ public partial class AgentPool : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public int? MaxPod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MaxPod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MaxPod = value ?? default(int); } + /// + /// Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. + /// This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must + /// be a static string (i.e., will be printed raw and not be executed as a script). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string MessageOfTheDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MessageOfTheDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MessageOfTheDay = value ?? null; } + /// Internal Acessors for CreationData - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICreationData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.CreationData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CreationData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CreationData = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICreationData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.CreationData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CreationData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CreationData = value ?? null /* model class */; } /// Internal Acessors for CurrentOrchestratorVersion - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.CurrentOrchestratorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CurrentOrchestratorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CurrentOrchestratorVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.CurrentOrchestratorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CurrentOrchestratorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CurrentOrchestratorVersion = value ?? null; } + + /// Internal Acessors for ETag + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ETag = value ?? null; } + + /// Internal Acessors for GatewayProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.GatewayProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).GatewayProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).GatewayProfile = value ?? null /* model class */; } + + /// Internal Acessors for GpuProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.GpuProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).GpuProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).GpuProfile = value ?? null /* model class */; } /// Internal Acessors for KubeletConfig - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.KubeletConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfig = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.KubeletConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfig = value ?? null /* model class */; } /// Internal Acessors for LinuxOSConfig - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ILinuxOSConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.LinuxOSConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfig = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ILinuxOSConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.LinuxOSConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfig = value ?? null /* model class */; } + + /// Internal Acessors for NetworkProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.NetworkProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NetworkProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NetworkProfile = value ?? null /* model class */; } /// Internal Acessors for NodeImageVersion - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.NodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeImageVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeImageVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.NodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeImageVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeImageVersion = value ?? null; } /// Internal Acessors for PowerState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PowerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PowerState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PowerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PowerState = value ?? null /* model class */; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfileProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAgentPoolProfileProperties()); set { {_property = value;} } } + /// Internal Acessors for ProvisioningErrorAdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.ProvisioningErrorAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorAdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorAdditionalInfo = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningErrorCode + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.ProvisioningErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorCode = value ?? null; } + + /// Internal Acessors for ProvisioningErrorDetail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.ProvisioningErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorDetail = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningErrorMessage + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.ProvisioningErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorMessage = value ?? null; } + + /// Internal Acessors for ProvisioningErrorTarget + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.ProvisioningErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorTarget = value ?? null; } + /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for SecurityProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.SecurityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).SecurityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).SecurityProfile = value ?? null /* model class */; } + + /// Internal Acessors for Status + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Status = value ?? null /* model class */; } + + /// Internal Acessors for StatusProvisioningError + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.StatusProvisioningError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).StatusProvisioningError; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).StatusProvisioningError = value ?? null /* model class */; } /// Internal Acessors for UpgradeSetting - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettings Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.UpgradeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSetting = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettings Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.UpgradeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSetting = value ?? null /* model class */; } + + /// Internal Acessors for VirtualMachineProfileScale + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.VirtualMachineProfileScale { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VirtualMachineProfileScale; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VirtualMachineProfileScale = value ?? null /* model class */; } + + /// Internal Acessors for VirtualMachinesProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.VirtualMachinesProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VirtualMachinesProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VirtualMachinesProfile = value ?? null /* model class */; } + + /// Internal Acessors for WindowsProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolInternal.WindowsProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).WindowsProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).WindowsProfile = value ?? null /* model class */; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Name = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Type = value ?? null; } /// The minimum number of nodes for auto-scaling [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public int? MinCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MinCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MinCount = value ?? default(int); } /// - /// A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions - /// and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools + /// The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information + /// on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string Mode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Mode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Mode = value ?? null; } @@ -234,6 +328,22 @@ public partial class AgentPool : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Name; } + /// + /// The port ranges that are allowed to access. The specified ranges are allowed to overlap. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List NetworkProfileAllowedHostPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NetworkProfileAllowedHostPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NetworkProfileAllowedHostPort = value ?? null /* arrayOf */; } + + /// + /// The IDs of the application security groups which agent pool will associate when created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List NetworkProfileApplicationSecurityGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NetworkProfileApplicationSecurityGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NetworkProfileApplicationSecurityGroup = value ?? null /* arrayOf */; } + + /// IPTags of instance-level public IPs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List NetworkProfileNodePublicIPTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NetworkProfileNodePublicIPTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NetworkProfileNodePublicIPTag = value ?? null /* arrayOf */; } + /// The version of node image [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string NodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeImageVersion; } @@ -243,7 +353,7 @@ public partial class AgentPool : public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeLabel = value ?? null /* model class */; } /// - /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// The public IP prefix ID which VM nodes should use IPs from. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string NodePublicIPPrefixId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodePublicIPPrefixId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodePublicIPPrefixId = value ?? null; } @@ -262,8 +372,9 @@ public partial class AgentPool : public int? OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSDiskSizeGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSDiskSizeGb = value ?? default(int); } /// - /// The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, - /// defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + /// The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has a + /// cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. + /// For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string OSDiskType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSDiskType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSDiskType = value ?? null; } @@ -280,20 +391,27 @@ public partial class AgentPool : public string OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSType = value ?? null; } /// - /// Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When - /// is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same - /// once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. - /// As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool - /// version must have the same major version as the control plane. The node pool minor version must be within two minor versions - /// of the control plane version. The node pool version cannot be greater than the control plane version. For more information - /// see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + /// The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + /// (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. + /// Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, + /// even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to + /// the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool + /// minor version must be within two minor versions of the control plane version. The node pool version cannot be greater + /// than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string OrchestratorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OrchestratorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OrchestratorVersion = value ?? null; } /// - /// If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default + /// is 'DynamicIndividual'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PodIPAllocationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PodIPAllocationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PodIPAllocationMode = value ?? null; } + + /// + /// The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node subnet + /// (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string PodSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PodSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PodSubnetId = value ?? null; } @@ -313,6 +431,26 @@ public partial class AgentPool : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfileProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAgentPoolProfileProperties()); set => this._property = value; } + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorAdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorCode; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ProvisioningErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorDetail; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorMessage; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningErrorTarget; } + /// The current deployment or provisioning state. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningState; } @@ -326,13 +464,19 @@ public partial class AgentPool : public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } /// - /// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. + /// The scale down mode to use when scaling the Agent Pool. This also effects the cluster autoscaler behavior. If not specified, + /// it defaults to Delete. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string ScaleDownMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleDownMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleDownMode = value ?? null; } + /// Specifications on how to scale the VirtualMachines agent pool to a fixed size. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ScaleManual { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleManual; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleManual = value ?? null /* arrayOf */; } + /// - /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// 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'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string ScaleSetEvictionPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleSetEvictionPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleSetEvictionPolicy = value ?? null; } @@ -344,8 +488,28 @@ public partial class AgentPool : public string ScaleSetPriority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleSetPriority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleSetPriority = value ?? null; } /// - /// Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. - /// For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + /// Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For + /// more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? SecurityProfileEnableSecureBoot { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).SecurityProfileEnableSecureBoot; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).SecurityProfileEnableSecureBoot = value ?? default(bool); } + + /// + /// vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the + /// node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? SecurityProfileEnableVtpm { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).SecurityProfileEnableVtpm; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).SecurityProfileEnableVtpm = value ?? default(bool); } + + /// SSH access method of an agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string SecurityProfileSshAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).SecurityProfileSshAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).SecurityProfileSshAccess = value ?? null; } + + /// + /// The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value greater + /// than zero or -1 which indicates default price to be up-to on-demand. Possible values are any decimal value greater than + /// zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs + /// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public float? SpotMaxPrice { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).SpotMaxPrice; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).SpotMaxPrice = value ?? default(float); } @@ -359,27 +523,72 @@ public partial class AgentPool : public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Type; } /// - /// This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the - /// percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. - /// If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade + /// The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per + /// node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If + /// not specified, the default is 30 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? UpgradeSettingDrainTimeoutInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSettingDrainTimeoutInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSettingDrainTimeoutInMinute = value ?? default(int); } + + /// + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') + /// or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time + /// of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + /// including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string UpgradeSettingMaxSurge { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSettingMaxSurge; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSettingMaxSurge = value ?? null; } /// - /// 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 + /// The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set + /// to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total + /// agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default + /// is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string UpgradeSettingMaxUnavailable { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSettingMaxUnavailable; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSettingMaxUnavailable = value ?? null; } + + /// + /// The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and + /// moving on to next node. If not specified, the default is 0 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? UpgradeSettingNodeSoakDurationInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSettingNodeSoakDurationInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSettingNodeSoakDurationInMinute = value ?? default(int); } + + /// + /// Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption + /// Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout + /// or pod is still being in a running state, can also cause undrainable nodes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string UpgradeSettingUndrainableNodeBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSettingUndrainableNodeBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSettingUndrainableNodeBehavior = value ?? null; } + + /// + /// 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 /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string VMSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VMSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VMSize = value ?? null; } + /// The status of nodes in a VirtualMachines agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List VirtualMachineNodesStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VirtualMachineNodesStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VirtualMachineNodesStatus = value ?? null /* arrayOf */; } + /// - /// If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to - /// nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// The ID of the subnet which agent pool nodes and optionally pods will join on startup. If this is not specified, a VNET + /// and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies + /// to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string VnetSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VnetSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VnetSubnetId = value ?? null; } + /// + /// Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if the + /// cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? WindowProfileDisableOutboundNat { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).WindowProfileDisableOutboundNat; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).WindowProfileDisableOutboundNat = value ?? default(bool); } + /// Determines the type of workload a node can run. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string WorkloadRuntime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).WorkloadRuntime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)Property).WorkloadRuntime = value ?? null; } @@ -421,6 +630,19 @@ public partial interface IAgentPool : PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List AvailabilityZone { get; set; } /// + /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"AKS will associate the specified agent pool with the Capacity Reservation Group.", + SerializedName = @"capacityReservationGroupID", + PossibleTypes = new [] { typeof(string) })] + string CapacityReservationGroupId { get; set; } + /// /// 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. /// @@ -446,8 +668,9 @@ public partial interface IAgentPool : PossibleTypes = new [] { typeof(string) })] string CreationDataSourceResourceId { get; set; } /// - /// If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion - /// is , this field will contain the full version being used. + /// The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version , + /// this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full + /// version being used. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -455,10 +678,25 @@ public partial interface IAgentPool : Read = true, Create = false, Update = false, - Description = @"If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full version being used.", + Description = @"The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full version being used.", SerializedName = @"currentOrchestratorVersion", PossibleTypes = new [] { typeof(string) })] string CurrentOrchestratorVersion { get; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"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.", + SerializedName = @"eTag", + PossibleTypes = new [] { typeof(string) })] + string ETag { get; } /// Whether to enable auto-scaler [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -471,7 +709,8 @@ public partial interface IAgentPool : PossibleTypes = new [] { typeof(bool) })] bool? EnableAutoScaling { get; set; } /// - /// This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption + /// Whether to enable host based OS and data drive encryption. This is only supported on certain VM sizes and in certain Azure + /// regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -479,12 +718,12 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption", + Description = @"Whether to enable host based OS and data drive encryption. This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption", SerializedName = @"enableEncryptionAtHost", PossibleTypes = new [] { typeof(bool) })] bool? EnableEncryptionAtHost { get; set; } /// - /// See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + /// Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) /// for more details. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -493,14 +732,14 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details.", + Description = @"Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details.", SerializedName = @"enableFIPS", PossibleTypes = new [] { typeof(bool) })] bool? EnableFips { get; set; } /// - /// Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario - /// is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. - /// For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + /// Whether each node is allocated its own public IP. Some scenarios may require nodes in a node pool to receive their own + /// dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection + /// to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). /// The default is false. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -509,7 +748,7 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false.", + Description = @"Whether each node is allocated its own public IP. Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false.", SerializedName = @"enableNodePublicIP", PossibleTypes = new [] { typeof(bool) })] bool? EnableNodePublicIP { get; set; } @@ -525,6 +764,23 @@ public partial interface IAgentPool : PossibleTypes = new [] { typeof(bool) })] bool? EnableUltraSsd { get; set; } /// + /// The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size + /// of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. + /// The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, + /// the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default + /// value is 31. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default value is 31.", + SerializedName = @"publicIPPrefixSize", + PossibleTypes = new [] { typeof(int) })] + int? GatewayProfilePublicIPPrefixSize { get; set; } + /// /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -538,8 +794,21 @@ public partial interface IAgentPool : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g")] string GpuInstanceProfile { get; set; } + /// Whether to install GPU drivers. When it's not specified, default is Install. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to install GPU drivers. When it's not specified, default is Install.", + SerializedName = @"driver", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Install", "None")] + string GpuProfileDriver { get; set; } /// - /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// The fully qualified resource ID of the Dedicated Host Group to provision virtual machines from, used only in creation + /// scenario and not allowed to changed once set. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. /// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -548,7 +817,7 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts).", + Description = @"The fully qualified resource ID of the Dedicated Host Group to provision virtual machines from, used only in creation scenario and not allowed to changed once set. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts).", SerializedName = @"hostGroupID", PossibleTypes = new [] { typeof(string) })] string HostGroupId { get; set; } @@ -587,20 +856,22 @@ public partial interface IAgentPool : SerializedName = @"containerLogMaxSizeMB", PossibleTypes = new [] { typeof(int) })] int? KubeletConfigContainerLogMaxSizeMb { get; set; } - /// The default is true. + /// + /// If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is true.", + Description = @"If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true.", SerializedName = @"cpuCfsQuota", PossibleTypes = new [] { typeof(bool) })] bool? KubeletConfigCpuCfsQuota { get; set; } /// - /// The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For - /// example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + /// The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an optional + /// fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -608,12 +879,12 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'.", + Description = @"The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'.", SerializedName = @"cpuCfsQuotaPeriod", PossibleTypes = new [] { typeof(string) })] string KubeletConfigCpuCfsQuotaPeriod { get; set; } /// - /// The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + /// The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) /// for more information. Allowed values are 'none' and 'static'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -622,7 +893,7 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) for more information. Allowed values are 'none' and 'static'.", + Description = @"The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) for more information. Allowed values are 'none' and 'static'.", SerializedName = @"cpuManagerPolicy", PossibleTypes = new [] { typeof(string) })] string KubeletConfigCpuManagerPolicy { get; set; } @@ -639,25 +910,31 @@ public partial interface IAgentPool : SerializedName = @"failSwapOn", PossibleTypes = new [] { typeof(bool) })] bool? KubeletConfigFailSwapOn { get; set; } - /// To disable image garbage collection, set to 100. The default is 85% + /// + /// The percent of disk usage after which image garbage collection is always run. To disable image garbage collection, set + /// to 100. The default is 85% + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"To disable image garbage collection, set to 100. The default is 85%", + Description = @"The percent of disk usage after which image garbage collection is always run. To disable image garbage collection, set to 100. The default is 85%", SerializedName = @"imageGcHighThreshold", PossibleTypes = new [] { typeof(int) })] int? KubeletConfigImageGcHighThreshold { get; set; } - /// This cannot be set higher than imageGcHighThreshold. The default is 80% + /// + /// The percent of disk usage before which image garbage collection is never run. This cannot be set higher than imageGcHighThreshold. + /// The default is 80% + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"This cannot be set higher than imageGcHighThreshold. The default is 80%", + Description = @"The percent of disk usage before which image garbage collection is never run. This cannot be set higher than imageGcHighThreshold. The default is 80%", SerializedName = @"imageGcLowThreshold", PossibleTypes = new [] { typeof(int) })] int? KubeletConfigImageGcLowThreshold { get; set; } @@ -673,7 +950,7 @@ public partial interface IAgentPool : PossibleTypes = new [] { typeof(int) })] int? KubeletConfigPodMaxPid { get; set; } /// - /// For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). + /// The Topology Manager policy to use. For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). /// The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -682,7 +959,7 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'.", + Description = @"The Topology Manager policy to use. For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'.", SerializedName = @"topologyManagerPolicy", PossibleTypes = new [] { typeof(string) })] string KubeletConfigTopologyManagerPolicy { get; set; } @@ -723,8 +1000,9 @@ public partial interface IAgentPool : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISysctlConfig) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISysctlConfig LinuxOSConfigSysctl { get; set; } /// - /// Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information - /// see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values are + /// 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent + /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -732,12 +1010,13 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).", + Description = @"Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).", SerializedName = @"transparentHugePageDefrag", PossibleTypes = new [] { typeof(string) })] string LinuxOSConfigTransparentHugePageDefrag { get; set; } /// - /// Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is 'always'. + /// For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -745,7 +1024,7 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).", + Description = @"Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).", SerializedName = @"transparentHugePageEnabled", PossibleTypes = new [] { typeof(string) })] string LinuxOSConfigTransparentHugePageEnabled { get; set; } @@ -771,6 +1050,21 @@ public partial interface IAgentPool : SerializedName = @"maxPods", PossibleTypes = new [] { typeof(int) })] int? MaxPod { get; set; } + /// + /// Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. + /// This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must + /// be a static string (i.e., will be printed raw and not be executed as a script). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script).", + SerializedName = @"messageOfTheDay", + PossibleTypes = new [] { typeof(string) })] + string MessageOfTheDay { get; set; } /// The minimum number of nodes for auto-scaling [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -783,8 +1077,8 @@ public partial interface IAgentPool : PossibleTypes = new [] { typeof(int) })] int? MinCount { get; set; } /// - /// A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions - /// and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools + /// The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information + /// on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -792,11 +1086,48 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools", + Description = @"The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools", SerializedName = @"mode", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("System", "User")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("System", "User", "Gateway")] string Mode { get; set; } + /// + /// The port ranges that are allowed to access. The specified ranges are allowed to overlap. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The port ranges that are allowed to access. The specified ranges are allowed to overlap.", + SerializedName = @"allowedHostPorts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRange) })] + System.Collections.Generic.List NetworkProfileAllowedHostPort { get; set; } + /// + /// The IDs of the application security groups which agent pool will associate when created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The IDs of the application security groups which agent pool will associate when created.", + SerializedName = @"applicationSecurityGroups", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List NetworkProfileApplicationSecurityGroup { get; set; } + /// IPTags of instance-level public IPs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"IPTags of instance-level public IPs.", + SerializedName = @"nodePublicIPTags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTag) })] + System.Collections.Generic.List NetworkProfileNodePublicIPTag { get; set; } /// The version of node image [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -820,7 +1151,7 @@ public partial interface IAgentPool : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesNodeLabels) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get; set; } /// - /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// The public IP prefix ID which VM nodes should use IPs from. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -828,7 +1159,7 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}", + Description = @"The public IP prefix ID which VM nodes should use IPs from. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}", SerializedName = @"nodePublicIPPrefixID", PossibleTypes = new [] { typeof(string) })] string NodePublicIPPrefixId { get; set; } @@ -860,8 +1191,9 @@ public partial interface IAgentPool : PossibleTypes = new [] { typeof(int) })] int? OSDiskSizeGb { get; set; } /// - /// The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, - /// defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + /// The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has a + /// cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. + /// For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -869,7 +1201,7 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os).", + Description = @"The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os).", SerializedName = @"osDiskType", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Managed", "Ephemeral")] @@ -887,7 +1219,7 @@ public partial interface IAgentPool : Description = @"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.", SerializedName = @"osSKU", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "CBLMariner", "Windows2019", "Windows2022")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "AzureLinux", "AzureLinux3", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204")] string OSSku { get; set; } /// The operating system type. The default is Linux. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -902,13 +1234,13 @@ public partial interface IAgentPool : [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Linux", "Windows")] string OSType { get; set; } /// - /// Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When - /// is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same - /// once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. - /// As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool - /// version must have the same major version as the control plane. The node pool minor version must be within two minor versions - /// of the control plane version. The node pool version cannot be greater than the control plane version. For more information - /// see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + /// The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + /// (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. + /// Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, + /// even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to + /// the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool + /// minor version must be within two minor versions of the control plane version. The node pool version cannot be greater + /// than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -916,13 +1248,28 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool).", + Description = @"The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool).", SerializedName = @"orchestratorVersion", PossibleTypes = new [] { typeof(string) })] string OrchestratorVersion { get; set; } /// - /// If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default + /// is 'DynamicIndividual'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'.", + SerializedName = @"podIPAllocationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("DynamicIndividual", "StaticBlock")] + string PodIPAllocationMode { get; set; } + /// + /// The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node subnet + /// (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -930,7 +1277,7 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", + Description = @"The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", SerializedName = @"podSubnetID", PossibleTypes = new [] { typeof(string) })] string PodSubnetId { get; set; } @@ -956,8 +1303,63 @@ public partial interface IAgentPool : Description = @"The type of Agent Pool.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("VirtualMachineScaleSets", "AvailabilitySet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("VirtualMachineScaleSets", "AvailabilitySet", "VirtualMachines")] string PropertiesType { get; set; } + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorCode { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) })] + System.Collections.Generic.List ProvisioningErrorDetail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorMessage { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorTarget { get; } /// The current deployment or provisioning state. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -981,7 +1383,8 @@ public partial interface IAgentPool : PossibleTypes = new [] { typeof(string) })] string ProximityPlacementGroupId { get; set; } /// - /// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. + /// The scale down mode to use when scaling the Agent Pool. This also effects the cluster autoscaler behavior. If not specified, + /// it defaults to Delete. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -989,13 +1392,25 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.", + Description = @"The scale down mode to use when scaling the Agent Pool. This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.", SerializedName = @"scaleDownMode", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Delete", "Deallocate")] string ScaleDownMode { get; set; } + /// Specifications on how to scale the VirtualMachines agent pool to a fixed size. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifications on how to scale the VirtualMachines agent pool to a fixed size.", + SerializedName = @"manual", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfile) })] + System.Collections.Generic.List ScaleManual { get; set; } /// - /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// 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'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1003,7 +1418,7 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.", + Description = @"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'.", SerializedName = @"scaleSetEvictionPolicy", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Delete", "Deallocate")] @@ -1023,8 +1438,8 @@ public partial interface IAgentPool : [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Spot", "Regular")] string ScaleSetPriority { get; set; } /// - /// Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. - /// For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + /// Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For + /// more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1032,7 +1447,49 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing)", + Description = @"Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false.", + SerializedName = @"enableSecureBoot", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityProfileEnableSecureBoot { get; set; } + /// + /// vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the + /// node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false.", + SerializedName = @"enableVTPM", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityProfileEnableVtpm { get; set; } + /// SSH access method of an agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"SSH access method of an agent pool.", + SerializedName = @"sshAccess", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("LocalUser", "Disabled")] + string SecurityProfileSshAccess { get; set; } + /// + /// The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value greater + /// than zero or -1 which indicates default price to be up-to on-demand. Possible values are any decimal value greater than + /// zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs + /// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing)", SerializedName = @"spotMaxPrice", PossibleTypes = new [] { typeof(float) })] float? SpotMaxPrice { get; set; } @@ -1048,9 +1505,25 @@ public partial interface IAgentPool : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesTags) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesTags Tag { get; set; } /// - /// This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the - /// percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. - /// If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade + /// The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per + /// node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If + /// not specified, the default is 30 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes.", + SerializedName = @"drainTimeoutInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? UpgradeSettingDrainTimeoutInMinute { get; set; } + /// + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') + /// or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time + /// of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + /// including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1058,13 +1531,59 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade", + Description = @"The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster", SerializedName = @"maxSurge", PossibleTypes = new [] { typeof(string) })] string UpgradeSettingMaxSurge { get; set; } /// - /// VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might - /// fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions + /// The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set + /// to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total + /// agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default + /// is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster", + SerializedName = @"maxUnavailable", + PossibleTypes = new [] { typeof(string) })] + string UpgradeSettingMaxUnavailable { get; set; } + /// + /// The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and + /// moving on to next node. If not specified, the default is 0 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node. If not specified, the default is 0 minutes.", + SerializedName = @"nodeSoakDurationInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? UpgradeSettingNodeSoakDurationInMinute { get; set; } + /// + /// Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption + /// Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout + /// or pod is still being in a running state, can also cause undrainable nodes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout or pod is still being in a running state, can also cause undrainable nodes.", + SerializedName = @"undrainableNodeBehavior", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Cordon", "Schedule")] + string UpgradeSettingUndrainableNodeBehavior { get; set; } + /// + /// 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 /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1072,13 +1591,25 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"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", + Description = @"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", SerializedName = @"vmSize", PossibleTypes = new [] { typeof(string) })] string VMSize { get; set; } + /// The status of nodes in a VirtualMachines agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The status of nodes in a VirtualMachines agent pool.", + SerializedName = @"virtualMachineNodesStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodes) })] + System.Collections.Generic.List VirtualMachineNodesStatus { get; set; } /// - /// If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to - /// nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// The ID of the subnet which agent pool nodes and optionally pods will join on startup. If this is not specified, a VNET + /// and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies + /// to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1086,10 +1617,24 @@ public partial interface IAgentPool : Read = true, Create = true, Update = true, - Description = @"If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", + Description = @"The ID of the subnet which agent pool nodes and optionally pods will join on startup. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", SerializedName = @"vnetSubnetID", PossibleTypes = new [] { typeof(string) })] string VnetSubnetId { get; set; } + /// + /// Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if the + /// cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled.", + SerializedName = @"disableOutboundNat", + PossibleTypes = new [] { typeof(bool) })] + bool? WindowProfileDisableOutboundNat { get; set; } /// Determines the type of workload a node can run. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1113,6 +1658,10 @@ internal partial interface IAgentPoolInternal : /// System.Collections.Generic.List AvailabilityZone { get; set; } /// + /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// + string CapacityReservationGroupId { get; set; } + /// /// 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. /// @@ -1124,37 +1673,63 @@ internal partial interface IAgentPoolInternal : /// This is the ARM ID of the source object to be used to create the target object. string CreationDataSourceResourceId { get; set; } /// - /// If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion - /// is , this field will contain the full version being used. + /// The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version , + /// this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full + /// version being used. /// string CurrentOrchestratorVersion { get; set; } + /// + /// 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. + /// + string ETag { get; set; } /// Whether to enable auto-scaler bool? EnableAutoScaling { get; set; } /// - /// This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption + /// Whether to enable host based OS and data drive encryption. This is only supported on certain VM sizes and in certain Azure + /// regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption /// bool? EnableEncryptionAtHost { get; set; } /// - /// See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + /// Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) /// for more details. /// bool? EnableFips { get; set; } /// - /// Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario - /// is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. - /// For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + /// Whether each node is allocated its own public IP. Some scenarios may require nodes in a node pool to receive their own + /// dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection + /// to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). /// The default is false. /// bool? EnableNodePublicIP { get; set; } /// Whether to enable UltraSSD bool? EnableUltraSsd { get; set; } /// + /// Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not Gateway. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile GatewayProfile { get; set; } + /// + /// The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size + /// of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. + /// The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, + /// the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default + /// value is 31. + /// + int? GatewayProfilePublicIPPrefixSize { get; set; } + /// /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g")] string GpuInstanceProfile { get; set; } - /// - /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// GPU settings for the Agent Pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile GpuProfile { get; set; } + /// Whether to install GPU drivers. When it's not specified, default is Install. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Install", "None")] + string GpuProfileDriver { get; set; } + /// + /// The fully qualified resource ID of the Dedicated Host Group to provision virtual machines from, used only in creation + /// scenario and not allowed to changed once set. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. /// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). /// string HostGroupId { get; set; } @@ -1168,15 +1743,17 @@ internal partial interface IAgentPoolInternal : int? KubeletConfigContainerLogMaxFile { get; set; } /// The maximum size (e.g. 10Mi) of container log file before it is rotated. int? KubeletConfigContainerLogMaxSizeMb { get; set; } - /// The default is true. + /// + /// If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true. + /// bool? KubeletConfigCpuCfsQuota { get; set; } /// - /// The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For - /// example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + /// The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an optional + /// fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. /// string KubeletConfigCpuCfsQuotaPeriod { get; set; } /// - /// The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + /// The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) /// for more information. Allowed values are 'none' and 'static'. /// string KubeletConfigCpuManagerPolicy { get; set; } @@ -1184,14 +1761,20 @@ internal partial interface IAgentPoolInternal : /// If set to true it will make the Kubelet fail to start if swap is enabled on the node. /// bool? KubeletConfigFailSwapOn { get; set; } - /// To disable image garbage collection, set to 100. The default is 85% + /// + /// The percent of disk usage after which image garbage collection is always run. To disable image garbage collection, set + /// to 100. The default is 85% + /// int? KubeletConfigImageGcHighThreshold { get; set; } - /// This cannot be set higher than imageGcHighThreshold. The default is 80% + /// + /// The percent of disk usage before which image garbage collection is never run. This cannot be set higher than imageGcHighThreshold. + /// The default is 80% + /// int? KubeletConfigImageGcLowThreshold { get; set; } /// The maximum number of processes per pod. int? KubeletConfigPodMaxPid { get; set; } /// - /// For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). + /// The Topology Manager policy to use. For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). /// The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. /// string KubeletConfigTopologyManagerPolicy { get; set; } @@ -1207,32 +1790,52 @@ internal partial interface IAgentPoolInternal : /// Sysctl settings for Linux agent nodes. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISysctlConfig LinuxOSConfigSysctl { get; set; } /// - /// Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information - /// see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values are + /// 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent + /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// string LinuxOSConfigTransparentHugePageDefrag { get; set; } /// - /// Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is 'always'. + /// For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// string LinuxOSConfigTransparentHugePageEnabled { get; set; } /// The maximum number of nodes for auto-scaling int? MaxCount { get; set; } /// The maximum number of pods that can run on a node. int? MaxPod { get; set; } + /// + /// Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. + /// This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must + /// be a static string (i.e., will be printed raw and not be executed as a script). + /// + string MessageOfTheDay { get; set; } /// The minimum number of nodes for auto-scaling int? MinCount { get; set; } /// - /// A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions - /// and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools + /// The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information + /// on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("System", "User")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("System", "User", "Gateway")] string Mode { get; set; } + /// Network-related settings of an agent pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile NetworkProfile { get; set; } + /// + /// The port ranges that are allowed to access. The specified ranges are allowed to overlap. + /// + System.Collections.Generic.List NetworkProfileAllowedHostPort { get; set; } + /// + /// The IDs of the application security groups which agent pool will associate when created. + /// + System.Collections.Generic.List NetworkProfileApplicationSecurityGroup { get; set; } + /// IPTags of instance-level public IPs. + System.Collections.Generic.List NetworkProfileNodePublicIPTag { get; set; } /// The version of node image string NodeImageVersion { get; set; } /// The node labels to be persisted across all nodes in agent pool. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get; set; } /// - /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// The public IP prefix ID which VM nodes should use IPs from. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} /// string NodePublicIPPrefixId { get; set; } /// @@ -1245,8 +1848,9 @@ internal partial interface IAgentPoolInternal : /// int? OSDiskSizeGb { get; set; } /// - /// The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, - /// defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + /// The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has a + /// cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. + /// For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Managed", "Ephemeral")] string OSDiskType { get; set; } @@ -1254,51 +1858,71 @@ internal partial interface IAgentPoolInternal : /// 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. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "CBLMariner", "Windows2019", "Windows2022")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "AzureLinux", "AzureLinux3", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204")] string OSSku { get; set; } /// The operating system type. The default is Linux. [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Linux", "Windows")] string OSType { get; set; } /// - /// Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When - /// is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same - /// once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. - /// As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool - /// version must have the same major version as the control plane. The node pool minor version must be within two minor versions - /// of the control plane version. The node pool version cannot be greater than the control plane version. For more information - /// see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + /// The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + /// (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. + /// Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, + /// even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to + /// the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool + /// minor version must be within two minor versions of the control plane version. The node pool version cannot be greater + /// than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). /// string OrchestratorVersion { get; set; } /// - /// If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default + /// is 'DynamicIndividual'. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("DynamicIndividual", "StaticBlock")] + string PodIPAllocationMode { get; set; } + /// + /// The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node subnet + /// (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} /// string PodSubnetId { get; set; } /// - /// When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. - /// A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it - /// is Running and provisioning state is Succeeded + /// Whether the Agent Pool is running or stopped. When an Agent Pool is first created it is initially Running. The Agent Pool + /// can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing + /// charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded /// Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState PowerState { get; set; } /// Tells whether the cluster is Running or Stopped [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Running", "Stopped")] string PowerStateCode { get; set; } /// The type of Agent Pool. - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("VirtualMachineScaleSets", "AvailabilitySet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("VirtualMachineScaleSets", "AvailabilitySet", "VirtualMachines")] string PropertiesType { get; set; } /// Properties of an agent pool. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfileProperties Property { get; set; } + /// The error additional info. + System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get; set; } + /// The error code. + string ProvisioningErrorCode { get; set; } + /// The error details. + System.Collections.Generic.List ProvisioningErrorDetail { get; set; } + /// The error message. + string ProvisioningErrorMessage { get; set; } + /// The error target. + string ProvisioningErrorTarget { get; set; } /// The current deployment or provisioning state. string ProvisioningState { get; set; } /// The ID for Proximity Placement Group. string ProximityPlacementGroupId { get; set; } /// - /// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. + /// The scale down mode to use when scaling the Agent Pool. This also effects the cluster autoscaler behavior. If not specified, + /// it defaults to Delete. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Delete", "Deallocate")] string ScaleDownMode { get; set; } + /// Specifications on how to scale the VirtualMachines agent pool to a fixed size. + System.Collections.Generic.List ScaleManual { get; set; } /// - /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// 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'. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Delete", "Deallocate")] string ScaleSetEvictionPolicy { get; set; } @@ -1307,31 +1931,95 @@ internal partial interface IAgentPoolInternal : /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Spot", "Regular")] string ScaleSetPriority { get; set; } + /// The security settings of an agent pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile SecurityProfile { get; set; } + /// + /// Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For + /// more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + bool? SecurityProfileEnableSecureBoot { get; set; } + /// + /// vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the + /// node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + bool? SecurityProfileEnableVtpm { get; set; } + /// SSH access method of an agent pool. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("LocalUser", "Disabled")] + string SecurityProfileSshAccess { get; set; } /// - /// Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. - /// For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + /// The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value greater + /// than zero or -1 which indicates default price to be up-to on-demand. Possible values are any decimal value greater than + /// zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs + /// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) /// float? SpotMaxPrice { get; set; } + /// Contains read-only information about the Agent Pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus Status { get; set; } + /// + /// The error detail information of the agent pool. Preserves the detailed info of failure. If there was no error, this field + /// is omitted. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail StatusProvisioningError { get; set; } /// The tags to be persisted on the agent pool virtual machine scale set. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesTags Tag { get; set; } /// Settings for upgrading the agentpool Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettings UpgradeSetting { get; set; } /// - /// This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the - /// percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. - /// If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade + /// The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per + /// node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If + /// not specified, the default is 30 minutes. + /// + int? UpgradeSettingDrainTimeoutInMinute { get; set; } + /// + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') + /// or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time + /// of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + /// including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster /// string UpgradeSettingMaxSurge { get; set; } /// - /// VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might - /// fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions + /// The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set + /// to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total + /// agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default + /// is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + /// + string UpgradeSettingMaxUnavailable { get; set; } + /// + /// The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and + /// moving on to next node. If not specified, the default is 0 minutes. + /// + int? UpgradeSettingNodeSoakDurationInMinute { get; set; } + /// + /// Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption + /// Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout + /// or pod is still being in a running state, can also cause undrainable nodes. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Cordon", "Schedule")] + string UpgradeSettingUndrainableNodeBehavior { get; set; } + /// + /// 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 /// string VMSize { get; set; } + /// The status of nodes in a VirtualMachines agent pool. + System.Collections.Generic.List VirtualMachineNodesStatus { get; set; } + /// Specifications on how to scale a VirtualMachines agent pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile VirtualMachineProfileScale { get; set; } + /// Specifications on VirtualMachines agent pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile VirtualMachinesProfile { get; set; } /// - /// If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to - /// nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// The ID of the subnet which agent pool nodes and optionally pods will join on startup. If this is not specified, a VNET + /// and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies + /// to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} /// string VnetSubnetId { get; set; } + /// + /// Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if the + /// cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. + /// + bool? WindowProfileDisableOutboundNat { get; set; } + /// The Windows agent pool's specific profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile WindowsProfile { get; set; } /// Determines the type of workload a node can run. [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("OCIContainer", "WasmWasi")] string WorkloadRuntime { get; set; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionPropertyList.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolDeleteMachinesParameter.PowerShell.cs similarity index 72% rename from generated/Aks/Aks.Autorest/generated/api/Models/OSOptionPropertyList.PowerShell.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolDeleteMachinesParameter.PowerShell.cs index 6965dc3336ce..9ea02111654d 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionPropertyList.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolDeleteMachinesParameter.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// The list of OS option properties. - [System.ComponentModel.TypeConverter(typeof(OSOptionPropertyListTypeConverter))] - public partial class OSOptionPropertyList + /// Specifies a list of machine names from the agent pool to be deleted. + [System.ComponentModel.TypeConverter(typeof(AgentPoolDeleteMachinesParameterTypeConverter))] + public partial class AgentPoolDeleteMachinesParameter { /// @@ -63,44 +63,11 @@ public partial class OSOptionPropertyList partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new OSOptionPropertyList(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new OSOptionPropertyList(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal OSOptionPropertyList(global::System.Collections.IDictionary content) + internal AgentPoolDeleteMachinesParameter(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -109,19 +76,19 @@ internal OSOptionPropertyList(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("OSOptionPropertyList1")) + if (content.Contains("MachineName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyListInternal)this).OSOptionPropertyList1 = (System.Collections.Generic.List) content.GetValueForProperty("OSOptionPropertyList1",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyListInternal)this).OSOptionPropertyList1, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionPropertyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameterInternal)this).MachineName = (System.Collections.Generic.List) content.GetValueForProperty("MachineName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameterInternal)this).MachineName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal OSOptionPropertyList(global::System.Management.Automation.PSObject content) + internal AgentPoolDeleteMachinesParameter(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -130,13 +97,46 @@ internal OSOptionPropertyList(global::System.Management.Automation.PSObject cont return; } // actually deserialize - if (content.Contains("OSOptionPropertyList1")) + if (content.Contains("MachineName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyListInternal)this).OSOptionPropertyList1 = (System.Collections.Generic.List) content.GetValueForProperty("OSOptionPropertyList1",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyListInternal)this).OSOptionPropertyList1, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionPropertyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameterInternal)this).MachineName = (System.Collections.Generic.List) content.GetValueForProperty("MachineName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameterInternal)this).MachineName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AgentPoolDeleteMachinesParameter(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AgentPoolDeleteMachinesParameter(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + /// Serializes this instance to a json string. /// a containing this model serialized to JSON text. @@ -154,9 +154,9 @@ public override string ToString() return ToJsonString(); } } - /// The list of OS option properties. - [System.ComponentModel.TypeConverter(typeof(OSOptionPropertyListTypeConverter))] - public partial interface IOSOptionPropertyList + /// Specifies a list of machine names from the agent pool to be deleted. + [System.ComponentModel.TypeConverter(typeof(AgentPoolDeleteMachinesParameterTypeConverter))] + public partial interface IAgentPoolDeleteMachinesParameter { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolDeleteMachinesParameter.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolDeleteMachinesParameter.TypeConverter.cs new file mode 100644 index 000000000000..15783c5604ef --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolDeleteMachinesParameter.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AgentPoolDeleteMachinesParameterTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AgentPoolDeleteMachinesParameter.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AgentPoolDeleteMachinesParameter.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AgentPoolDeleteMachinesParameter.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolDeleteMachinesParameter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolDeleteMachinesParameter.cs new file mode 100644 index 000000000000..7e74f7b1c9f4 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolDeleteMachinesParameter.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Specifies a list of machine names from the agent pool to be deleted. + public partial class AgentPoolDeleteMachinesParameter : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameterInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _machineName; + + /// The agent pool machine names. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List MachineName { get => this._machineName; set => this._machineName = value; } + + /// Creates an new instance. + public AgentPoolDeleteMachinesParameter() + { + + } + } + /// Specifies a list of machine names from the agent pool to be deleted. + public partial interface IAgentPoolDeleteMachinesParameter : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The agent pool machine names. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The agent pool machine names.", + SerializedName = @"machineNames", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List MachineName { get; set; } + + } + /// Specifies a list of machine names from the agent pool to be deleted. + internal partial interface IAgentPoolDeleteMachinesParameterInternal + + { + /// The agent pool machine names. + System.Collections.Generic.List MachineName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolDeleteMachinesParameter.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolDeleteMachinesParameter.json.cs new file mode 100644 index 000000000000..518d5425c32a --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolDeleteMachinesParameter.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Specifies a list of machine names from the agent pool to be deleted. + public partial class AgentPoolDeleteMachinesParameter + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal AgentPoolDeleteMachinesParameter(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_machineName = If( json?.PropertyT("machineNames"), out var __jsonMachineNames) ? If( __jsonMachineNames as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _machineName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolDeleteMachinesParameter(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._machineName) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._machineName ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("machineNames",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolGatewayProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolGatewayProfile.PowerShell.cs new file mode 100644 index 000000000000..1ee06ae5cb77 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolGatewayProfile.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Profile of the managed cluster gateway agent pool. + [System.ComponentModel.TypeConverter(typeof(AgentPoolGatewayProfileTypeConverter))] + public partial class AgentPoolGatewayProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AgentPoolGatewayProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PublicIPPrefixSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfileInternal)this).PublicIPPrefixSize = (int?) content.GetValueForProperty("PublicIPPrefixSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfileInternal)this).PublicIPPrefixSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AgentPoolGatewayProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PublicIPPrefixSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfileInternal)this).PublicIPPrefixSize = (int?) content.GetValueForProperty("PublicIPPrefixSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfileInternal)this).PublicIPPrefixSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AgentPoolGatewayProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AgentPoolGatewayProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Profile of the managed cluster gateway agent pool. + [System.ComponentModel.TypeConverter(typeof(AgentPoolGatewayProfileTypeConverter))] + public partial interface IAgentPoolGatewayProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolGatewayProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolGatewayProfile.TypeConverter.cs new file mode 100644 index 000000000000..f30384d3002e --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolGatewayProfile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AgentPoolGatewayProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AgentPoolGatewayProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AgentPoolGatewayProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AgentPoolGatewayProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolGatewayProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolGatewayProfile.cs new file mode 100644 index 000000000000..5b3420fe5448 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolGatewayProfile.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Profile of the managed cluster gateway agent pool. + public partial class AgentPoolGatewayProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfileInternal + { + + /// Backing field for property. + private int? _publicIPPrefixSize; + + /// + /// The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size + /// of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. + /// The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, + /// the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default + /// value is 31. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? PublicIPPrefixSize { get => this._publicIPPrefixSize; set => this._publicIPPrefixSize = value; } + + /// Creates an new instance. + public AgentPoolGatewayProfile() + { + + } + } + /// Profile of the managed cluster gateway agent pool. + public partial interface IAgentPoolGatewayProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size + /// of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. + /// The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, + /// the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default + /// value is 31. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default value is 31.", + SerializedName = @"publicIPPrefixSize", + PossibleTypes = new [] { typeof(int) })] + int? PublicIPPrefixSize { get; set; } + + } + /// Profile of the managed cluster gateway agent pool. + internal partial interface IAgentPoolGatewayProfileInternal + + { + /// + /// The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size + /// of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. + /// The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, + /// the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default + /// value is 31. + /// + int? PublicIPPrefixSize { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolGatewayProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolGatewayProfile.json.cs new file mode 100644 index 000000000000..f2d0f70ade5f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolGatewayProfile.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Profile of the managed cluster gateway agent pool. + public partial class AgentPoolGatewayProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal AgentPoolGatewayProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_publicIPPrefixSize = If( json?.PropertyT("publicIPPrefixSize"), out var __jsonPublicIPPrefixSize) ? (int?)__jsonPublicIPPrefixSize : _publicIPPrefixSize;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolGatewayProfile(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._publicIPPrefixSize ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._publicIPPrefixSize) : null, "publicIPPrefixSize" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolNetworkProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolNetworkProfile.PowerShell.cs new file mode 100644 index 000000000000..a274875e0cdc --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolNetworkProfile.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Network settings of an agent pool. + [System.ComponentModel.TypeConverter(typeof(AgentPoolNetworkProfileTypeConverter))] + public partial class AgentPoolNetworkProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AgentPoolNetworkProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NodePublicIPTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)this).NodePublicIPTag = (System.Collections.Generic.List) content.GetValueForProperty("NodePublicIPTag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)this).NodePublicIPTag, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPTagTypeConverter.ConvertFrom)); + } + if (content.Contains("AllowedHostPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)this).AllowedHostPort = (System.Collections.Generic.List) content.GetValueForProperty("AllowedHostPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)this).AllowedHostPort, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PortRangeTypeConverter.ConvertFrom)); + } + if (content.Contains("ApplicationSecurityGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)this).ApplicationSecurityGroup = (System.Collections.Generic.List) content.GetValueForProperty("ApplicationSecurityGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)this).ApplicationSecurityGroup, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AgentPoolNetworkProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NodePublicIPTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)this).NodePublicIPTag = (System.Collections.Generic.List) content.GetValueForProperty("NodePublicIPTag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)this).NodePublicIPTag, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPTagTypeConverter.ConvertFrom)); + } + if (content.Contains("AllowedHostPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)this).AllowedHostPort = (System.Collections.Generic.List) content.GetValueForProperty("AllowedHostPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)this).AllowedHostPort, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PortRangeTypeConverter.ConvertFrom)); + } + if (content.Contains("ApplicationSecurityGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)this).ApplicationSecurityGroup = (System.Collections.Generic.List) content.GetValueForProperty("ApplicationSecurityGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)this).ApplicationSecurityGroup, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AgentPoolNetworkProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AgentPoolNetworkProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Network settings of an agent pool. + [System.ComponentModel.TypeConverter(typeof(AgentPoolNetworkProfileTypeConverter))] + public partial interface IAgentPoolNetworkProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolNetworkProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolNetworkProfile.TypeConverter.cs new file mode 100644 index 000000000000..bd0a11909683 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolNetworkProfile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AgentPoolNetworkProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AgentPoolNetworkProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AgentPoolNetworkProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AgentPoolNetworkProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolNetworkProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolNetworkProfile.cs new file mode 100644 index 000000000000..f9d8032436f6 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolNetworkProfile.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Network settings of an agent pool. + public partial class AgentPoolNetworkProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _allowedHostPort; + + /// + /// The port ranges that are allowed to access. The specified ranges are allowed to overlap. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List AllowedHostPort { get => this._allowedHostPort; set => this._allowedHostPort = value; } + + /// Backing field for property. + private System.Collections.Generic.List _applicationSecurityGroup; + + /// + /// The IDs of the application security groups which agent pool will associate when created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List ApplicationSecurityGroup { get => this._applicationSecurityGroup; set => this._applicationSecurityGroup = value; } + + /// Backing field for property. + private System.Collections.Generic.List _nodePublicIPTag; + + /// IPTags of instance-level public IPs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List NodePublicIPTag { get => this._nodePublicIPTag; set => this._nodePublicIPTag = value; } + + /// Creates an new instance. + public AgentPoolNetworkProfile() + { + + } + } + /// Network settings of an agent pool. + public partial interface IAgentPoolNetworkProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// The port ranges that are allowed to access. The specified ranges are allowed to overlap. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The port ranges that are allowed to access. The specified ranges are allowed to overlap.", + SerializedName = @"allowedHostPorts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRange) })] + System.Collections.Generic.List AllowedHostPort { get; set; } + /// + /// The IDs of the application security groups which agent pool will associate when created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The IDs of the application security groups which agent pool will associate when created.", + SerializedName = @"applicationSecurityGroups", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List ApplicationSecurityGroup { get; set; } + /// IPTags of instance-level public IPs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"IPTags of instance-level public IPs.", + SerializedName = @"nodePublicIPTags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTag) })] + System.Collections.Generic.List NodePublicIPTag { get; set; } + + } + /// Network settings of an agent pool. + internal partial interface IAgentPoolNetworkProfileInternal + + { + /// + /// The port ranges that are allowed to access. The specified ranges are allowed to overlap. + /// + System.Collections.Generic.List AllowedHostPort { get; set; } + /// + /// The IDs of the application security groups which agent pool will associate when created. + /// + System.Collections.Generic.List ApplicationSecurityGroup { get; set; } + /// IPTags of instance-level public IPs. + System.Collections.Generic.List NodePublicIPTag { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolNetworkProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolNetworkProfile.json.cs new file mode 100644 index 000000000000..68ed613a8b18 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolNetworkProfile.json.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Network settings of an agent pool. + public partial class AgentPoolNetworkProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal AgentPoolNetworkProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_nodePublicIPTag = If( json?.PropertyT("nodePublicIPTags"), out var __jsonNodePublicIPTags) ? If( __jsonNodePublicIPTags as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTag) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPTag.FromJson(__u) )) ))() : null : _nodePublicIPTag;} + {_allowedHostPort = If( json?.PropertyT("allowedHostPorts"), out var __jsonAllowedHostPorts) ? If( __jsonAllowedHostPorts as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRange) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PortRange.FromJson(__p) )) ))() : null : _allowedHostPort;} + {_applicationSecurityGroup = If( json?.PropertyT("applicationSecurityGroups"), out var __jsonApplicationSecurityGroups) ? If( __jsonApplicationSecurityGroups as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : _applicationSecurityGroup;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolNetworkProfile(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._nodePublicIPTag) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._nodePublicIPTag ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("nodePublicIPTags",__w); + } + if (null != this._allowedHostPort) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __s in this._allowedHostPort ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("allowedHostPorts",__r); + } + if (null != this._applicationSecurityGroup) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __n in this._applicationSecurityGroup ) + { + AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + } + container.Add("applicationSecurityGroups",__m); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolSecurityProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolSecurityProfile.PowerShell.cs new file mode 100644 index 000000000000..50ac9b799955 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolSecurityProfile.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The security settings of an agent pool. + [System.ComponentModel.TypeConverter(typeof(AgentPoolSecurityProfileTypeConverter))] + public partial class AgentPoolSecurityProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AgentPoolSecurityProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("EnableVtpm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)this).EnableVtpm = (bool?) content.GetValueForProperty("EnableVtpm",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)this).EnableVtpm, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableSecureBoot")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)this).EnableSecureBoot = (bool?) content.GetValueForProperty("EnableSecureBoot",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)this).EnableSecureBoot, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SshAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)this).SshAccess = (string) content.GetValueForProperty("SshAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)this).SshAccess, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AgentPoolSecurityProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("EnableVtpm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)this).EnableVtpm = (bool?) content.GetValueForProperty("EnableVtpm",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)this).EnableVtpm, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableSecureBoot")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)this).EnableSecureBoot = (bool?) content.GetValueForProperty("EnableSecureBoot",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)this).EnableSecureBoot, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SshAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)this).SshAccess = (string) content.GetValueForProperty("SshAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)this).SshAccess, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AgentPoolSecurityProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AgentPoolSecurityProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The security settings of an agent pool. + [System.ComponentModel.TypeConverter(typeof(AgentPoolSecurityProfileTypeConverter))] + public partial interface IAgentPoolSecurityProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolSecurityProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolSecurityProfile.TypeConverter.cs new file mode 100644 index 000000000000..05c6c21d94ca --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolSecurityProfile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AgentPoolSecurityProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AgentPoolSecurityProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AgentPoolSecurityProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AgentPoolSecurityProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolSecurityProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolSecurityProfile.cs new file mode 100644 index 000000000000..94c99bd020a0 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolSecurityProfile.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The security settings of an agent pool. + public partial class AgentPoolSecurityProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal + { + + /// Backing field for property. + private bool? _enableSecureBoot; + + /// + /// Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For + /// more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? EnableSecureBoot { get => this._enableSecureBoot; set => this._enableSecureBoot = value; } + + /// Backing field for property. + private bool? _enableVtpm; + + /// + /// vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the + /// node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? EnableVtpm { get => this._enableVtpm; set => this._enableVtpm = value; } + + /// Backing field for property. + private string _sshAccess; + + /// SSH access method of an agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string SshAccess { get => this._sshAccess; set => this._sshAccess = value; } + + /// Creates an new instance. + public AgentPoolSecurityProfile() + { + + } + } + /// The security settings of an agent pool. + public partial interface IAgentPoolSecurityProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For + /// more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false.", + SerializedName = @"enableSecureBoot", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableSecureBoot { get; set; } + /// + /// vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the + /// node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false.", + SerializedName = @"enableVTPM", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableVtpm { get; set; } + /// SSH access method of an agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"SSH access method of an agent pool.", + SerializedName = @"sshAccess", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("LocalUser", "Disabled")] + string SshAccess { get; set; } + + } + /// The security settings of an agent pool. + internal partial interface IAgentPoolSecurityProfileInternal + + { + /// + /// Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For + /// more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + bool? EnableSecureBoot { get; set; } + /// + /// vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the + /// node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + bool? EnableVtpm { get; set; } + /// SSH access method of an agent pool. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("LocalUser", "Disabled")] + string SshAccess { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolSecurityProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolSecurityProfile.json.cs new file mode 100644 index 000000000000..1d28761a7447 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolSecurityProfile.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The security settings of an agent pool. + public partial class AgentPoolSecurityProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal AgentPoolSecurityProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_enableVtpm = If( json?.PropertyT("enableVTPM"), out var __jsonEnableVtpm) ? (bool?)__jsonEnableVtpm : _enableVtpm;} + {_enableSecureBoot = If( json?.PropertyT("enableSecureBoot"), out var __jsonEnableSecureBoot) ? (bool?)__jsonEnableSecureBoot : _enableSecureBoot;} + {_sshAccess = If( json?.PropertyT("sshAccess"), out var __jsonSshAccess) ? (string)__jsonSshAccess : (string)_sshAccess;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolSecurityProfile(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._enableVtpm ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enableVtpm) : null, "enableVTPM" ,container.Add ); + AddIf( null != this._enableSecureBoot ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enableSecureBoot) : null, "enableSecureBoot" ,container.Add ); + AddIf( null != (((object)this._sshAccess)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._sshAccess.ToString()) : null, "sshAccess" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolStatus.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolStatus.PowerShell.cs new file mode 100644 index 000000000000..3ef7c9d99dfc --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolStatus.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Contains read-only information about the Agent Pool. + [System.ComponentModel.TypeConverter(typeof(AgentPoolStatusTypeConverter))] + public partial class AgentPoolStatus + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AgentPoolStatus(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("ProvisioningError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorCode = (string) content.GetValueForProperty("ProvisioningErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorMessage = (string) content.GetValueForProperty("ProvisioningErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorTarget = (string) content.GetValueForProperty("ProvisioningErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorTarget, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorDetail = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AgentPoolStatus(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("ProvisioningError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorCode = (string) content.GetValueForProperty("ProvisioningErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorMessage = (string) content.GetValueForProperty("ProvisioningErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorTarget = (string) content.GetValueForProperty("ProvisioningErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorTarget, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorDetail = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)this).ProvisioningErrorAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AgentPoolStatus(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AgentPoolStatus(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Contains read-only information about the Agent Pool. + [System.ComponentModel.TypeConverter(typeof(AgentPoolStatusTypeConverter))] + public partial interface IAgentPoolStatus + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolStatus.TypeConverter.cs similarity index 89% rename from generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProfile.TypeConverter.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolStatus.TypeConverter.cs index 936973c0a144..f5733c260339 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProfile.TypeConverter.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolStatus.TypeConverter.cs @@ -8,9 +8,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class OSOptionProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class AgentPoolStatusTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class OSOptionProfileTypeConverter : global::System.Management.Au public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// not used by this TypeConverter. /// when set to true, will ignore the case when converting. /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter into an instance of + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus).IsAssignableFrom(type)) { return sourceValue; } try { - return OSOptionProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return AgentPoolStatus.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile Con } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return OSOptionProfile.DeserializeFromPSObject(sourceValue); + return AgentPoolStatus.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return OSOptionProfile.DeserializeFromDictionary(sourceValue); + return AgentPoolStatus.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolStatus.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolStatus.cs new file mode 100644 index 000000000000..0f678916cec3 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolStatus.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Contains read-only information about the Agent Pool. + public partial class AgentPoolStatus : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal + { + + /// Internal Acessors for ProvisioningError + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal.ProvisioningError { get => (this._provisioningError = this._provisioningError ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetail()); set { {_provisioningError = value;} } } + + /// Internal Acessors for ProvisioningErrorAdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal.ProvisioningErrorAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).AdditionalInfo = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningErrorCode + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal.ProvisioningErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Code = value ?? null; } + + /// Internal Acessors for ProvisioningErrorDetail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal.ProvisioningErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Detail = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningErrorMessage + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal.ProvisioningErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Message = value ?? null; } + + /// Internal Acessors for ProvisioningErrorTarget + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal.ProvisioningErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Target = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail _provisioningError; + + /// + /// The error detail information of the agent pool. Preserves the detailed info of failure. If there was no error, this field + /// is omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail ProvisioningError { get => (this._provisioningError = this._provisioningError ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetail()); } + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ProvisioningErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Detail; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Message; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Target; } + + /// Creates an new instance. + public AgentPoolStatus() + { + + } + } + /// Contains read-only information about the Agent Pool. + public partial interface IAgentPoolStatus : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorCode { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) })] + System.Collections.Generic.List ProvisioningErrorDetail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorMessage { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorTarget { get; } + + } + /// Contains read-only information about the Agent Pool. + internal partial interface IAgentPoolStatusInternal + + { + /// + /// The error detail information of the agent pool. Preserves the detailed info of failure. If there was no error, this field + /// is omitted. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail ProvisioningError { get; set; } + /// The error additional info. + System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get; set; } + /// The error code. + string ProvisioningErrorCode { get; set; } + /// The error details. + System.Collections.Generic.List ProvisioningErrorDetail { get; set; } + /// The error message. + string ProvisioningErrorMessage { get; set; } + /// The error target. + string ProvisioningErrorTarget { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolStatus.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolStatus.json.cs new file mode 100644 index 000000000000..800f3bc19fb7 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolStatus.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Contains read-only information about the Agent Pool. + public partial class AgentPoolStatus + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal AgentPoolStatus(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provisioningError = If( json?.PropertyT("provisioningError"), out var __jsonProvisioningError) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetail.FromJson(__jsonProvisioningError) : _provisioningError;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolStatus(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._provisioningError ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._provisioningError.ToJson(null,serializationMode) : null, "provisioningError" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolUpgradeSettings.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolUpgradeSettings.PowerShell.cs index da08583b3508..7449f5f784ab 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolUpgradeSettings.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolUpgradeSettings.PowerShell.cs @@ -80,6 +80,22 @@ internal AgentPoolUpgradeSettings(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).MaxSurge = (string) content.GetValueForProperty("MaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).MaxSurge, global::System.Convert.ToString); } + if (content.Contains("MaxUnavailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).MaxUnavailable = (string) content.GetValueForProperty("MaxUnavailable",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).MaxUnavailable, global::System.Convert.ToString); + } + if (content.Contains("DrainTimeoutInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).DrainTimeoutInMinute = (int?) content.GetValueForProperty("DrainTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).DrainTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NodeSoakDurationInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).NodeSoakDurationInMinute = (int?) content.GetValueForProperty("NodeSoakDurationInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).NodeSoakDurationInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UndrainableNodeBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).UndrainableNodeBehavior = (string) content.GetValueForProperty("UndrainableNodeBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).UndrainableNodeBehavior, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -101,6 +117,22 @@ internal AgentPoolUpgradeSettings(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).MaxSurge = (string) content.GetValueForProperty("MaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).MaxSurge, global::System.Convert.ToString); } + if (content.Contains("MaxUnavailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).MaxUnavailable = (string) content.GetValueForProperty("MaxUnavailable",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).MaxUnavailable, global::System.Convert.ToString); + } + if (content.Contains("DrainTimeoutInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).DrainTimeoutInMinute = (int?) content.GetValueForProperty("DrainTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).DrainTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NodeSoakDurationInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).NodeSoakDurationInMinute = (int?) content.GetValueForProperty("NodeSoakDurationInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).NodeSoakDurationInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UndrainableNodeBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).UndrainableNodeBehavior = (string) content.GetValueForProperty("UndrainableNodeBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)this).UndrainableNodeBehavior, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolUpgradeSettings.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolUpgradeSettings.cs index 64a057f0fd05..aef058fdb24a 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolUpgradeSettings.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolUpgradeSettings.cs @@ -13,17 +13,62 @@ public partial class AgentPoolUpgradeSettings : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal { + /// Backing field for property. + private int? _drainTimeoutInMinute; + + /// + /// The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per + /// node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If + /// not specified, the default is 30 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? DrainTimeoutInMinute { get => this._drainTimeoutInMinute; set => this._drainTimeoutInMinute = value; } + /// Backing field for property. private string _maxSurge; /// - /// This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the - /// percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. - /// If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') + /// or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time + /// of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + /// including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string MaxSurge { get => this._maxSurge; set => this._maxSurge = value; } + /// Backing field for property. + private string _maxUnavailable; + + /// + /// The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set + /// to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total + /// agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default + /// is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string MaxUnavailable { get => this._maxUnavailable; set => this._maxUnavailable = value; } + + /// Backing field for property. + private int? _nodeSoakDurationInMinute; + + /// + /// The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and + /// moving on to next node. If not specified, the default is 0 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NodeSoakDurationInMinute { get => this._nodeSoakDurationInMinute; set => this._nodeSoakDurationInMinute = value; } + + /// Backing field for property. + private string _undrainableNodeBehavior; + + /// + /// Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption + /// Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout + /// or pod is still being in a running state, can also cause undrainable nodes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string UndrainableNodeBehavior { get => this._undrainableNodeBehavior; set => this._undrainableNodeBehavior = value; } + /// Creates an new instance. public AgentPoolUpgradeSettings() { @@ -35,9 +80,9 @@ public partial interface IAgentPoolUpgradeSettings : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { /// - /// This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the - /// percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. - /// If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade + /// The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per + /// node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If + /// not specified, the default is 30 minutes. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -45,10 +90,72 @@ public partial interface IAgentPoolUpgradeSettings : Read = true, Create = true, Update = true, - Description = @"This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade", + Description = @"The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes.", + SerializedName = @"drainTimeoutInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? DrainTimeoutInMinute { get; set; } + /// + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') + /// or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time + /// of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + /// including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster", SerializedName = @"maxSurge", PossibleTypes = new [] { typeof(string) })] string MaxSurge { get; set; } + /// + /// The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set + /// to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total + /// agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default + /// is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster", + SerializedName = @"maxUnavailable", + PossibleTypes = new [] { typeof(string) })] + string MaxUnavailable { get; set; } + /// + /// The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and + /// moving on to next node. If not specified, the default is 0 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node. If not specified, the default is 0 minutes.", + SerializedName = @"nodeSoakDurationInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? NodeSoakDurationInMinute { get; set; } + /// + /// Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption + /// Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout + /// or pod is still being in a running state, can also cause undrainable nodes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout or pod is still being in a running state, can also cause undrainable nodes.", + SerializedName = @"undrainableNodeBehavior", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Cordon", "Schedule")] + string UndrainableNodeBehavior { get; set; } } /// Settings for upgrading an agentpool @@ -56,11 +163,37 @@ internal partial interface IAgentPoolUpgradeSettingsInternal { /// - /// This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the - /// percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. - /// If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade + /// The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per + /// node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If + /// not specified, the default is 30 minutes. + /// + int? DrainTimeoutInMinute { get; set; } + /// + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') + /// or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time + /// of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + /// including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster /// string MaxSurge { get; set; } + /// + /// The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set + /// to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total + /// agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default + /// is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + /// + string MaxUnavailable { get; set; } + /// + /// The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and + /// moving on to next node. If not specified, the default is 0 minutes. + /// + int? NodeSoakDurationInMinute { get; set; } + /// + /// Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption + /// Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout + /// or pod is still being in a running state, can also cause undrainable nodes. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Cordon", "Schedule")] + string UndrainableNodeBehavior { get; set; } } } \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolUpgradeSettings.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolUpgradeSettings.json.cs index 0a333f04e283..1595862742e2 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolUpgradeSettings.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolUpgradeSettings.json.cs @@ -66,6 +66,10 @@ internal AgentPoolUpgradeSettings(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime return; } {_maxSurge = If( json?.PropertyT("maxSurge"), out var __jsonMaxSurge) ? (string)__jsonMaxSurge : (string)_maxSurge;} + {_maxUnavailable = If( json?.PropertyT("maxUnavailable"), out var __jsonMaxUnavailable) ? (string)__jsonMaxUnavailable : (string)_maxUnavailable;} + {_drainTimeoutInMinute = If( json?.PropertyT("drainTimeoutInMinutes"), out var __jsonDrainTimeoutInMinutes) ? (int?)__jsonDrainTimeoutInMinutes : _drainTimeoutInMinute;} + {_nodeSoakDurationInMinute = If( json?.PropertyT("nodeSoakDurationInMinutes"), out var __jsonNodeSoakDurationInMinutes) ? (int?)__jsonNodeSoakDurationInMinutes : _nodeSoakDurationInMinute;} + {_undrainableNodeBehavior = If( json?.PropertyT("undrainableNodeBehavior"), out var __jsonUndrainableNodeBehavior) ? (string)__jsonUndrainableNodeBehavior : (string)_undrainableNodeBehavior;} AfterFromJson(json); } @@ -101,6 +105,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro return container; } AddIf( null != (((object)this._maxSurge)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._maxSurge.ToString()) : null, "maxSurge" ,container.Add ); + AddIf( null != (((object)this._maxUnavailable)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._maxUnavailable.ToString()) : null, "maxUnavailable" ,container.Add ); + AddIf( null != this._drainTimeoutInMinute ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._drainTimeoutInMinute) : null, "drainTimeoutInMinutes" ,container.Add ); + AddIf( null != this._nodeSoakDurationInMinute ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._nodeSoakDurationInMinute) : null, "nodeSoakDurationInMinutes" ,container.Add ); + AddIf( null != (((object)this._undrainableNodeBehavior)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._undrainableNodeBehavior.ToString()) : null, "undrainableNodeBehavior" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolWindowsProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolWindowsProfile.PowerShell.cs new file mode 100644 index 000000000000..cf9b8c59be7f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolWindowsProfile.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The Windows agent pool's specific profile. + [System.ComponentModel.TypeConverter(typeof(AgentPoolWindowsProfileTypeConverter))] + public partial class AgentPoolWindowsProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AgentPoolWindowsProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DisableOutboundNat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfileInternal)this).DisableOutboundNat = (bool?) content.GetValueForProperty("DisableOutboundNat",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfileInternal)this).DisableOutboundNat, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AgentPoolWindowsProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DisableOutboundNat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfileInternal)this).DisableOutboundNat = (bool?) content.GetValueForProperty("DisableOutboundNat",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfileInternal)this).DisableOutboundNat, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AgentPoolWindowsProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AgentPoolWindowsProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The Windows agent pool's specific profile. + [System.ComponentModel.TypeConverter(typeof(AgentPoolWindowsProfileTypeConverter))] + public partial interface IAgentPoolWindowsProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolWindowsProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolWindowsProfile.TypeConverter.cs new file mode 100644 index 000000000000..5d6f64f46c05 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolWindowsProfile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AgentPoolWindowsProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AgentPoolWindowsProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AgentPoolWindowsProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AgentPoolWindowsProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolWindowsProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolWindowsProfile.cs new file mode 100644 index 000000000000..dc4b4729779a --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolWindowsProfile.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The Windows agent pool's specific profile. + public partial class AgentPoolWindowsProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfileInternal + { + + /// Backing field for property. + private bool? _disableOutboundNat; + + /// + /// Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if the + /// cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? DisableOutboundNat { get => this._disableOutboundNat; set => this._disableOutboundNat = value; } + + /// Creates an new instance. + public AgentPoolWindowsProfile() + { + + } + } + /// The Windows agent pool's specific profile. + public partial interface IAgentPoolWindowsProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if the + /// cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled.", + SerializedName = @"disableOutboundNat", + PossibleTypes = new [] { typeof(bool) })] + bool? DisableOutboundNat { get; set; } + + } + /// The Windows agent pool's specific profile. + internal partial interface IAgentPoolWindowsProfileInternal + + { + /// + /// Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if the + /// cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. + /// + bool? DisableOutboundNat { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolWindowsProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolWindowsProfile.json.cs new file mode 100644 index 000000000000..1afcb19e08d6 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AgentPoolWindowsProfile.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The Windows agent pool's specific profile. + public partial class AgentPoolWindowsProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal AgentPoolWindowsProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_disableOutboundNat = If( json?.PropertyT("disableOutboundNat"), out var __jsonDisableOutboundNat) ? (bool?)__jsonDisableOutboundNat : _disableOutboundNat;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolWindowsProfile(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._disableOutboundNat ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._disableOutboundNat) : null, "disableOutboundNat" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AksIdentity.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AksIdentity.PowerShell.cs index 9d02953c08e3..0fa04542fb65 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/AksIdentity.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AksIdentity.PowerShell.cs @@ -99,6 +99,10 @@ internal AksIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).CommandId = (string) content.GetValueForProperty("CommandId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).CommandId, global::System.Convert.ToString); } + if (content.Contains("Mode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Mode = (string) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Mode, global::System.Convert.ToString); + } if (content.Contains("ConfigName")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).ConfigName = (string) content.GetValueForProperty("ConfigName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).ConfigName, global::System.Convert.ToString); @@ -111,6 +115,14 @@ internal AksIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).PrivateEndpointConnectionName = (string) content.GetValueForProperty("PrivateEndpointConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).PrivateEndpointConnectionName, global::System.Convert.ToString); } + if (content.Contains("TrustedAccessRoleBindingName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).TrustedAccessRoleBindingName = (string) content.GetValueForProperty("TrustedAccessRoleBindingName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).TrustedAccessRoleBindingName, global::System.Convert.ToString); + } + if (content.Contains("MachineName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).MachineName = (string) content.GetValueForProperty("MachineName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).MachineName, global::System.Convert.ToString); + } if (content.Contains("Id")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Id, global::System.Convert.ToString); @@ -156,6 +168,10 @@ internal AksIdentity(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).CommandId = (string) content.GetValueForProperty("CommandId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).CommandId, global::System.Convert.ToString); } + if (content.Contains("Mode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Mode = (string) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Mode, global::System.Convert.ToString); + } if (content.Contains("ConfigName")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).ConfigName = (string) content.GetValueForProperty("ConfigName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).ConfigName, global::System.Convert.ToString); @@ -168,6 +184,14 @@ internal AksIdentity(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).PrivateEndpointConnectionName = (string) content.GetValueForProperty("PrivateEndpointConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).PrivateEndpointConnectionName, global::System.Convert.ToString); } + if (content.Contains("TrustedAccessRoleBindingName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).TrustedAccessRoleBindingName = (string) content.GetValueForProperty("TrustedAccessRoleBindingName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).TrustedAccessRoleBindingName, global::System.Convert.ToString); + } + if (content.Contains("MachineName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).MachineName = (string) content.GetValueForProperty("MachineName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).MachineName, global::System.Convert.ToString); + } if (content.Contains("Id")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Id, global::System.Convert.ToString); diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AksIdentity.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AksIdentity.cs index ce7b69071a80..bc436c371e59 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/AksIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AksIdentity.cs @@ -43,10 +43,24 @@ public partial class AksIdentity : /// Backing field for property. private string _location; - /// The name of Azure region. + /// The name of the Azure region. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Location { get => this._location; set => this._location = value; } + /// Backing field for property. + private string _machineName; + + /// host name of the machine + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string MachineName { get => this._machineName; set => this._machineName = value; } + + /// Backing field for property. + private string _mode; + + /// The mode of the mesh. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Mode { get => this._mode; set => this._mode = value; } + /// Backing field for property. private string _privateEndpointConnectionName; @@ -78,10 +92,17 @@ public partial class AksIdentity : /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + /// Backing field for property. + private string _trustedAccessRoleBindingName; + + /// The name of trusted access role binding. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string TrustedAccessRoleBindingName { get => this._trustedAccessRoleBindingName; set => this._trustedAccessRoleBindingName = value; } + /// Creates an new instance. public AksIdentity() { @@ -135,17 +156,39 @@ public partial interface IAksIdentity : SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string Id { get; set; } - /// The name of Azure region. + /// The name of the Azure region. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The name of Azure region.", + Description = @"The name of the Azure region.", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] string Location { get; set; } + /// host name of the machine + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"host name of the machine", + SerializedName = @"machineName", + PossibleTypes = new [] { typeof(string) })] + string MachineName { get; set; } + /// The mode of the mesh. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The mode of the mesh.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(string) })] + string Mode { get; set; } /// The name of the private endpoint connection. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -190,17 +233,28 @@ public partial interface IAksIdentity : SerializedName = @"roleName", PossibleTypes = new [] { typeof(string) })] string RoleName { get; set; } - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] string SubscriptionId { get; set; } + /// The name of trusted access role binding. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of trusted access role binding.", + SerializedName = @"trustedAccessRoleBindingName", + PossibleTypes = new [] { typeof(string) })] + string TrustedAccessRoleBindingName { get; set; } } internal partial interface IAksIdentityInternal @@ -214,8 +268,12 @@ internal partial interface IAksIdentityInternal string ConfigName { get; set; } /// Resource identity path string Id { get; set; } - /// The name of Azure region. + /// The name of the Azure region. string Location { get; set; } + /// host name of the machine + string MachineName { get; set; } + /// The mode of the mesh. + string Mode { get; set; } /// The name of the private endpoint connection. string PrivateEndpointConnectionName { get; set; } /// The name of the resource group. The name is case insensitive. @@ -224,8 +282,10 @@ internal partial interface IAksIdentityInternal string ResourceName { get; set; } /// The name of the role for managed cluster accessProfile resource. string RoleName { get; set; } - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. string SubscriptionId { get; set; } + /// The name of trusted access role binding. + string TrustedAccessRoleBindingName { get; set; } } } \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AksIdentity.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AksIdentity.json.cs index 66bde53cf474..425f69854894 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/AksIdentity.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AksIdentity.json.cs @@ -70,9 +70,12 @@ internal AksIdentity(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObj {_resourceName = If( json?.PropertyT("resourceName"), out var __jsonResourceName) ? (string)__jsonResourceName : (string)_resourceName;} {_roleName = If( json?.PropertyT("roleName"), out var __jsonRoleName) ? (string)__jsonRoleName : (string)_roleName;} {_commandId = If( json?.PropertyT("commandId"), out var __jsonCommandId) ? (string)__jsonCommandId : (string)_commandId;} + {_mode = If( json?.PropertyT("mode"), out var __jsonMode) ? (string)__jsonMode : (string)_mode;} {_configName = If( json?.PropertyT("configName"), out var __jsonConfigName) ? (string)__jsonConfigName : (string)_configName;} {_agentPoolName = If( json?.PropertyT("agentPoolName"), out var __jsonAgentPoolName) ? (string)__jsonAgentPoolName : (string)_agentPoolName;} {_privateEndpointConnectionName = If( json?.PropertyT("privateEndpointConnectionName"), out var __jsonPrivateEndpointConnectionName) ? (string)__jsonPrivateEndpointConnectionName : (string)_privateEndpointConnectionName;} + {_trustedAccessRoleBindingName = If( json?.PropertyT("trustedAccessRoleBindingName"), out var __jsonTrustedAccessRoleBindingName) ? (string)__jsonTrustedAccessRoleBindingName : (string)_trustedAccessRoleBindingName;} + {_machineName = If( json?.PropertyT("machineName"), out var __jsonMachineName) ? (string)__jsonMachineName : (string)_machineName;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } @@ -112,9 +115,12 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro AddIf( null != (((object)this._resourceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._resourceName.ToString()) : null, "resourceName" ,container.Add ); AddIf( null != (((object)this._roleName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._roleName.ToString()) : null, "roleName" ,container.Add ); AddIf( null != (((object)this._commandId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._commandId.ToString()) : null, "commandId" ,container.Add ); + AddIf( null != (((object)this._mode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._mode.ToString()) : null, "mode" ,container.Add ); AddIf( null != (((object)this._configName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._configName.ToString()) : null, "configName" ,container.Add ); AddIf( null != (((object)this._agentPoolName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._agentPoolName.ToString()) : null, "agentPoolName" ,container.Add ); AddIf( null != (((object)this._privateEndpointConnectionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._privateEndpointConnectionName.ToString()) : null, "privateEndpointConnectionName" ,container.Add ); + AddIf( null != (((object)this._trustedAccessRoleBindingName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._trustedAccessRoleBindingName.ToString()) : null, "trustedAccessRoleBindingName" ,container.Add ); + AddIf( null != (((object)this._machineName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._machineName.ToString()) : null, "machineName" ,container.Add ); AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/Any.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/Any.PowerShell.cs new file mode 100644 index 000000000000..f279bb17f0aa --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/Any.PowerShell.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Anything + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial class Any + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Any(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Any(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Any(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Any(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Anything + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial interface IAny + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/Any.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/Any.TypeConverter.cs new file mode 100644 index 000000000000..c368e20b8f08 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/Any.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AnyTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Any.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Any.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Any.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/Any.cs b/generated/Aks/Aks.Autorest/generated/api/Models/Any.cs new file mode 100644 index 000000000000..adbc85aad6ba --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/Any.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Anything + public partial class Any : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAnyInternal + { + + /// Creates an new instance. + public Any() + { + + } + } + /// Anything + public partial interface IAny : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + + } + /// Anything + internal partial interface IAnyInternal + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/Any.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/Any.json.cs new file mode 100644 index 000000000000..14aacf1debab --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/Any.json.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Anything + public partial class Any + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal Any(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new Any(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/AzureKeyVaultKms.cs b/generated/Aks/Aks.Autorest/generated/api/Models/AzureKeyVaultKms.cs index a6aff6147160..36dccccc804e 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/AzureKeyVaultKms.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/AzureKeyVaultKms.cs @@ -35,9 +35,9 @@ public partial class AzureKeyVaultKms : private string _keyVaultNetworkAccess; /// - /// Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public - /// access from all networks. `Private` means the key vault disables public access and enables private link. The default value - /// is `Public`. + /// Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` + /// means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables + /// private link. The default value is `Public`. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string KeyVaultNetworkAccess { get => this._keyVaultNetworkAccess; set => this._keyVaultNetworkAccess = value; } @@ -89,9 +89,9 @@ public partial interface IAzureKeyVaultKms : PossibleTypes = new [] { typeof(string) })] string KeyId { get; set; } /// - /// Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public - /// access from all networks. `Private` means the key vault disables public access and enables private link. The default value - /// is `Public`. + /// Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` + /// means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables + /// private link. The default value is `Public`. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -99,7 +99,7 @@ public partial interface IAzureKeyVaultKms : Read = true, Create = true, Update = true, - Description = @"Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables private link. The default value is `Public`.", + Description = @"Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables private link. The default value is `Public`.", SerializedName = @"keyVaultNetworkAccess", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Public", "Private")] @@ -133,9 +133,9 @@ internal partial interface IAzureKeyVaultKmsInternal /// string KeyId { get; set; } /// - /// Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public - /// access from all networks. `Private` means the key vault disables public access and enables private link. The default value - /// is `Public`. + /// Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` + /// means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables + /// private link. The default value is `Public`. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Public", "Private")] string KeyVaultNetworkAccess { get; set; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/CloudError.cs b/generated/Aks/Aks.Autorest/generated/api/Models/CloudError.cs deleted file mode 100644 index ef491be88af7..000000000000 --- a/generated/Aks/Aks.Autorest/generated/api/Models/CloudError.cs +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// An error response from the Container service. - public partial class CloudError : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal - { - - /// - /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)Error).Code = value ?? null; } - - /// A list of additional details about the error. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)Error).Detail = value ?? null /* arrayOf */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody _error; - - /// Details about the error. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudErrorBody()); set => this._error = value; } - - /// - /// A message describing the error, intended to be suitable for display in a user interface. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)Error).Message = value ?? null; } - - /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudErrorBody()); set { {_error = value;} } } - - /// - /// The target of the particular error. For example, the name of the property in error. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)Error).Target = value ?? null; } - - /// Creates an new instance. - public CloudError() - { - - } - } - /// An error response from the Container service. - public partial interface ICloudError : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// - /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string Code { get; set; } - /// A list of additional details about the error. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"A list of additional details about the error.", - SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody) })] - System.Collections.Generic.List Detail { get; set; } - /// - /// A message describing the error, intended to be suitable for display in a user interface. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"A message describing the error, intended to be suitable for display in a user interface.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string Message { get; set; } - /// - /// The target of the particular error. For example, the name of the property in error. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"The target of the particular error. For example, the name of the property in error.", - SerializedName = @"target", - PossibleTypes = new [] { typeof(string) })] - string Target { get; set; } - - } - /// An error response from the Container service. - internal partial interface ICloudErrorInternal - - { - /// - /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - /// - string Code { get; set; } - /// A list of additional details about the error. - System.Collections.Generic.List Detail { get; set; } - /// Details about the error. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody Error { get; set; } - /// - /// A message describing the error, intended to be suitable for display in a user interface. - /// - string Message { get; set; } - /// - /// The target of the particular error. For example, the name of the property in error. - /// - string Target { get; set; } - - } -} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/CloudErrorBody.cs b/generated/Aks/Aks.Autorest/generated/api/Models/CloudErrorBody.cs deleted file mode 100644 index 8b0380153408..000000000000 --- a/generated/Aks/Aks.Autorest/generated/api/Models/CloudErrorBody.cs +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// An error response from the Container service. - public partial class CloudErrorBody : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal - { - - /// Backing field for property. - private string _code; - - /// - /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string Code { get => this._code; set => this._code = value; } - - /// Backing field for property. - private System.Collections.Generic.List _detail; - - /// A list of additional details about the error. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public System.Collections.Generic.List Detail { get => this._detail; set => this._detail = value; } - - /// Backing field for property. - private string _message; - - /// - /// A message describing the error, intended to be suitable for display in a user interface. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string Message { get => this._message; set => this._message = value; } - - /// Backing field for property. - private string _target; - - /// - /// The target of the particular error. For example, the name of the property in error. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string Target { get => this._target; set => this._target = value; } - - /// Creates an new instance. - public CloudErrorBody() - { - - } - } - /// An error response from the Container service. - public partial interface ICloudErrorBody : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// - /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string Code { get; set; } - /// A list of additional details about the error. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"A list of additional details about the error.", - SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody) })] - System.Collections.Generic.List Detail { get; set; } - /// - /// A message describing the error, intended to be suitable for display in a user interface. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"A message describing the error, intended to be suitable for display in a user interface.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string Message { get; set; } - /// - /// The target of the particular error. For example, the name of the property in error. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"The target of the particular error. For example, the name of the property in error.", - SerializedName = @"target", - PossibleTypes = new [] { typeof(string) })] - string Target { get; set; } - - } - /// An error response from the Container service. - internal partial interface ICloudErrorBodyInternal - - { - /// - /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - /// - string Code { get; set; } - /// A list of additional details about the error. - System.Collections.Generic.List Detail { get; set; } - /// - /// A message describing the error, intended to be suitable for display in a user interface. - /// - string Message { get; set; } - /// - /// The target of the particular error. For example, the name of the property in error. - /// - string Target { get; set; } - - } -} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ClusterUpgradeSettings.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ClusterUpgradeSettings.PowerShell.cs new file mode 100644 index 000000000000..d475c6840e42 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ClusterUpgradeSettings.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Settings for upgrading a cluster. + [System.ComponentModel.TypeConverter(typeof(ClusterUpgradeSettingsTypeConverter))] + public partial class ClusterUpgradeSettings + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ClusterUpgradeSettings(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OverrideSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)this).OverrideSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings) content.GetValueForProperty("OverrideSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)this).OverrideSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UpgradeOverrideSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OverrideSettingForceUpgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)this).OverrideSettingForceUpgrade = (bool?) content.GetValueForProperty("OverrideSettingForceUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)this).OverrideSettingForceUpgrade, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("OverrideSettingUntil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)this).OverrideSettingUntil = (global::System.DateTime?) content.GetValueForProperty("OverrideSettingUntil",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)this).OverrideSettingUntil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ClusterUpgradeSettings(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OverrideSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)this).OverrideSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings) content.GetValueForProperty("OverrideSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)this).OverrideSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UpgradeOverrideSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OverrideSettingForceUpgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)this).OverrideSettingForceUpgrade = (bool?) content.GetValueForProperty("OverrideSettingForceUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)this).OverrideSettingForceUpgrade, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("OverrideSettingUntil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)this).OverrideSettingUntil = (global::System.DateTime?) content.GetValueForProperty("OverrideSettingUntil",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)this).OverrideSettingUntil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ClusterUpgradeSettings(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ClusterUpgradeSettings(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Settings for upgrading a cluster. + [System.ComponentModel.TypeConverter(typeof(ClusterUpgradeSettingsTypeConverter))] + public partial interface IClusterUpgradeSettings + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ClusterUpgradeSettings.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ClusterUpgradeSettings.TypeConverter.cs new file mode 100644 index 000000000000..32d5633243fe --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ClusterUpgradeSettings.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ClusterUpgradeSettingsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ClusterUpgradeSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ClusterUpgradeSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ClusterUpgradeSettings.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ClusterUpgradeSettings.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ClusterUpgradeSettings.cs new file mode 100644 index 000000000000..2107b487f26e --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ClusterUpgradeSettings.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Settings for upgrading a cluster. + public partial class ClusterUpgradeSettings : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal + { + + /// Internal Acessors for OverrideSetting + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal.OverrideSetting { get => (this._overrideSetting = this._overrideSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UpgradeOverrideSettings()); set { {_overrideSetting = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings _overrideSetting; + + /// Settings for overrides. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings OverrideSetting { get => (this._overrideSetting = this._overrideSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UpgradeOverrideSettings()); set => this._overrideSetting = value; } + + /// + /// Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections + /// such as checking for deprecated API usage. Enable this option only with caution. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? OverrideSettingForceUpgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettingsInternal)OverrideSetting).ForceUpgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettingsInternal)OverrideSetting).ForceUpgrade = value ?? default(bool); } + + /// + /// Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness + /// won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. + /// It must be set for the overrides to take effect. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public global::System.DateTime? OverrideSettingUntil { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettingsInternal)OverrideSetting).Until; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettingsInternal)OverrideSetting).Until = value ?? default(global::System.DateTime); } + + /// Creates an new instance. + public ClusterUpgradeSettings() + { + + } + } + /// Settings for upgrading a cluster. + public partial interface IClusterUpgradeSettings : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections + /// such as checking for deprecated API usage. Enable this option only with caution. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections such as checking for deprecated API usage. Enable this option only with caution.", + SerializedName = @"forceUpgrade", + PossibleTypes = new [] { typeof(bool) })] + bool? OverrideSettingForceUpgrade { get; set; } + /// + /// Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness + /// won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. + /// It must be set for the overrides to take effect. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. It must be set for the overrides to take effect.", + SerializedName = @"until", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OverrideSettingUntil { get; set; } + + } + /// Settings for upgrading a cluster. + internal partial interface IClusterUpgradeSettingsInternal + + { + /// Settings for overrides. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings OverrideSetting { get; set; } + /// + /// Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections + /// such as checking for deprecated API usage. Enable this option only with caution. + /// + bool? OverrideSettingForceUpgrade { get; set; } + /// + /// Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness + /// won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. + /// It must be set for the overrides to take effect. + /// + global::System.DateTime? OverrideSettingUntil { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ClusterUpgradeSettings.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ClusterUpgradeSettings.json.cs new file mode 100644 index 000000000000..ef29ea44a4df --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ClusterUpgradeSettings.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Settings for upgrading a cluster. + public partial class ClusterUpgradeSettings + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ClusterUpgradeSettings(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_overrideSetting = If( json?.PropertyT("overrideSettings"), out var __jsonOverrideSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UpgradeOverrideSettings.FromJson(__jsonOverrideSettings) : _overrideSetting;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ClusterUpgradeSettings(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._overrideSetting ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._overrideSetting.ToJson(null,serializationMode) : null, "overrideSettings" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/CompatibleVersions.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/CompatibleVersions.PowerShell.cs new file mode 100644 index 000000000000..d60c5f50d204 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/CompatibleVersions.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// Version information about a product/service that is compatible with a service mesh revision. + /// + [System.ComponentModel.TypeConverter(typeof(CompatibleVersionsTypeConverter))] + public partial class CompatibleVersions + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CompatibleVersions(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersionsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersionsInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersionsInternal)this).Version = (System.Collections.Generic.List) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersionsInternal)this).Version, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CompatibleVersions(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersionsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersionsInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersionsInternal)this).Version = (System.Collections.Generic.List) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersionsInternal)this).Version, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersions DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CompatibleVersions(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersions DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CompatibleVersions(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersions FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Version information about a product/service that is compatible with a service mesh revision. + [System.ComponentModel.TypeConverter(typeof(CompatibleVersionsTypeConverter))] + public partial interface ICompatibleVersions + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/CompatibleVersions.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/CompatibleVersions.TypeConverter.cs new file mode 100644 index 000000000000..75a6ec74e2f8 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/CompatibleVersions.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CompatibleVersionsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersions ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersions).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CompatibleVersions.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CompatibleVersions.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CompatibleVersions.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/CompatibleVersions.cs b/generated/Aks/Aks.Autorest/generated/api/Models/CompatibleVersions.cs new file mode 100644 index 000000000000..20184ec690df --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/CompatibleVersions.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Version information about a product/service that is compatible with a service mesh revision. + /// + public partial class CompatibleVersions : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersions, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersionsInternal + { + + /// Backing field for property. + private string _name; + + /// The product/service name. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private System.Collections.Generic.List _version; + + /// Product/service versions compatible with a service mesh add-on revision. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Version { get => this._version; set => this._version = value; } + + /// Creates an new instance. + public CompatibleVersions() + { + + } + } + /// Version information about a product/service that is compatible with a service mesh revision. + public partial interface ICompatibleVersions : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The product/service name. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The product/service name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Product/service versions compatible with a service mesh add-on revision. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Product/service versions compatible with a service mesh add-on revision.", + SerializedName = @"versions", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List Version { get; set; } + + } + /// Version information about a product/service that is compatible with a service mesh revision. + internal partial interface ICompatibleVersionsInternal + + { + /// The product/service name. + string Name { get; set; } + /// Product/service versions compatible with a service mesh add-on revision. + System.Collections.Generic.List Version { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/CompatibleVersions.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/CompatibleVersions.json.cs new file mode 100644 index 000000000000..d4e560b9b15a --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/CompatibleVersions.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Version information about a product/service that is compatible with a service mesh revision. + /// + public partial class CompatibleVersions + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal CompatibleVersions(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_version = If( json?.PropertyT("versions"), out var __jsonVersions) ? If( __jsonVersions as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _version;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersions. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersions. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersions FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new CompatibleVersions(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + if (null != this._version) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._version ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("versions",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ContainerServiceNetworkProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ContainerServiceNetworkProfile.PowerShell.cs index b7e2c3238cb7..af80ad1b0875 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ContainerServiceNetworkProfile.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ContainerServiceNetworkProfile.PowerShell.cs @@ -76,6 +76,10 @@ internal ContainerServiceNetworkProfile(global::System.Collections.IDictionary c return; } // actually deserialize + if (content.Contains("AdvancedNetworking")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworking = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking) content.GetValueForProperty("AdvancedNetworking",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworking, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingTypeConverter.ConvertFrom); + } if (content.Contains("LoadBalancerProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfile) content.GetValueForProperty("LoadBalancerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterLoadBalancerProfileTypeConverter.ConvertFrom); @@ -84,6 +88,10 @@ internal ContainerServiceNetworkProfile(global::System.Collections.IDictionary c { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NatGatewayProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfile) content.GetValueForProperty("NatGatewayProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NatGatewayProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNatGatewayProfileTypeConverter.ConvertFrom); } + if (content.Contains("StaticEgressGatewayProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).StaticEgressGatewayProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile) content.GetValueForProperty("StaticEgressGatewayProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).StaticEgressGatewayProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStaticEgressGatewayProfileTypeConverter.ConvertFrom); + } if (content.Contains("NetworkPlugin")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NetworkPlugin = (string) content.GetValueForProperty("NetworkPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NetworkPlugin, global::System.Convert.ToString); @@ -116,10 +124,6 @@ internal ContainerServiceNetworkProfile(global::System.Collections.IDictionary c { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).DnsServiceIP = (string) content.GetValueForProperty("DnsServiceIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).DnsServiceIP, global::System.Convert.ToString); } - if (content.Contains("DockerBridgeCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).DockerBridgeCidr = (string) content.GetValueForProperty("DockerBridgeCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).DockerBridgeCidr, global::System.Convert.ToString); - } if (content.Contains("OutboundType")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).OutboundType = (string) content.GetValueForProperty("OutboundType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).OutboundType, global::System.Convert.ToString); @@ -140,6 +144,18 @@ internal ContainerServiceNetworkProfile(global::System.Collections.IDictionary c { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).IPFamily = (System.Collections.Generic.List) content.GetValueForProperty("IPFamily",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).IPFamily, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("AdvancedNetworkingObservability")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworkingObservability = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability) content.GetValueForProperty("AdvancedNetworkingObservability",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworkingObservability, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingObservabilityTypeConverter.ConvertFrom); + } + if (content.Contains("AdvancedNetworkingSecurity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworkingSecurity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity) content.GetValueForProperty("AdvancedNetworkingSecurity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworkingSecurity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingSecurityTypeConverter.ConvertFrom); + } + if (content.Contains("AdvancedNetworkingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworkingEnabled = (bool?) content.GetValueForProperty("AdvancedNetworkingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworkingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("LoadBalancerProfileManagedOutboundIP")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("LoadBalancerProfileManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); @@ -168,6 +184,10 @@ internal ContainerServiceNetworkProfile(global::System.Collections.IDictionary c { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEnableMultipleStandardLoadBalancer = (bool?) content.GetValueForProperty("LoadBalancerProfileEnableMultipleStandardLoadBalancer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEnableMultipleStandardLoadBalancer, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("LoadBalancerProfileBackendPoolType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileBackendPoolType = (string) content.GetValueForProperty("LoadBalancerProfileBackendPoolType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileBackendPoolType, global::System.Convert.ToString); + } if (content.Contains("NatGatewayProfileManagedOutboundIPProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileManagedOutboundIPProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterManagedOutboundIPProfile) content.GetValueForProperty("NatGatewayProfileManagedOutboundIPProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileManagedOutboundIPProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterManagedOutboundIPProfileTypeConverter.ConvertFrom); @@ -180,6 +200,22 @@ internal ContainerServiceNetworkProfile(global::System.Collections.IDictionary c { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileIdleTimeoutInMinute = (int?) content.GetValueForProperty("NatGatewayProfileIdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileIdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } + if (content.Contains("StaticEgressGatewayProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).StaticEgressGatewayProfileEnabled = (bool?) content.GetValueForProperty("StaticEgressGatewayProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).StaticEgressGatewayProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ObservabilityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).ObservabilityEnabled = (bool?) content.GetValueForProperty("ObservabilityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).ObservabilityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).SecurityEnabled = (bool?) content.GetValueForProperty("SecurityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).SecurityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityAdvancedNetworkPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).SecurityAdvancedNetworkPolicy = (string) content.GetValueForProperty("SecurityAdvancedNetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).SecurityAdvancedNetworkPolicy, global::System.Convert.ToString); + } if (content.Contains("ManagedOutboundIPCount")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -217,6 +253,10 @@ internal ContainerServiceNetworkProfile(global::System.Management.Automation.PSO return; } // actually deserialize + if (content.Contains("AdvancedNetworking")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworking = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking) content.GetValueForProperty("AdvancedNetworking",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworking, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingTypeConverter.ConvertFrom); + } if (content.Contains("LoadBalancerProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfile) content.GetValueForProperty("LoadBalancerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterLoadBalancerProfileTypeConverter.ConvertFrom); @@ -225,6 +265,10 @@ internal ContainerServiceNetworkProfile(global::System.Management.Automation.PSO { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NatGatewayProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfile) content.GetValueForProperty("NatGatewayProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NatGatewayProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNatGatewayProfileTypeConverter.ConvertFrom); } + if (content.Contains("StaticEgressGatewayProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).StaticEgressGatewayProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile) content.GetValueForProperty("StaticEgressGatewayProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).StaticEgressGatewayProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStaticEgressGatewayProfileTypeConverter.ConvertFrom); + } if (content.Contains("NetworkPlugin")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NetworkPlugin = (string) content.GetValueForProperty("NetworkPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NetworkPlugin, global::System.Convert.ToString); @@ -257,10 +301,6 @@ internal ContainerServiceNetworkProfile(global::System.Management.Automation.PSO { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).DnsServiceIP = (string) content.GetValueForProperty("DnsServiceIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).DnsServiceIP, global::System.Convert.ToString); } - if (content.Contains("DockerBridgeCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).DockerBridgeCidr = (string) content.GetValueForProperty("DockerBridgeCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).DockerBridgeCidr, global::System.Convert.ToString); - } if (content.Contains("OutboundType")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).OutboundType = (string) content.GetValueForProperty("OutboundType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).OutboundType, global::System.Convert.ToString); @@ -281,6 +321,18 @@ internal ContainerServiceNetworkProfile(global::System.Management.Automation.PSO { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).IPFamily = (System.Collections.Generic.List) content.GetValueForProperty("IPFamily",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).IPFamily, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("AdvancedNetworkingObservability")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworkingObservability = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability) content.GetValueForProperty("AdvancedNetworkingObservability",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworkingObservability, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingObservabilityTypeConverter.ConvertFrom); + } + if (content.Contains("AdvancedNetworkingSecurity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworkingSecurity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity) content.GetValueForProperty("AdvancedNetworkingSecurity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworkingSecurity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworkingSecurityTypeConverter.ConvertFrom); + } + if (content.Contains("AdvancedNetworkingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworkingEnabled = (bool?) content.GetValueForProperty("AdvancedNetworkingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).AdvancedNetworkingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("LoadBalancerProfileManagedOutboundIP")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("LoadBalancerProfileManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); @@ -309,6 +361,10 @@ internal ContainerServiceNetworkProfile(global::System.Management.Automation.PSO { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEnableMultipleStandardLoadBalancer = (bool?) content.GetValueForProperty("LoadBalancerProfileEnableMultipleStandardLoadBalancer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEnableMultipleStandardLoadBalancer, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("LoadBalancerProfileBackendPoolType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileBackendPoolType = (string) content.GetValueForProperty("LoadBalancerProfileBackendPoolType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileBackendPoolType, global::System.Convert.ToString); + } if (content.Contains("NatGatewayProfileManagedOutboundIPProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileManagedOutboundIPProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterManagedOutboundIPProfile) content.GetValueForProperty("NatGatewayProfileManagedOutboundIPProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileManagedOutboundIPProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterManagedOutboundIPProfileTypeConverter.ConvertFrom); @@ -321,6 +377,22 @@ internal ContainerServiceNetworkProfile(global::System.Management.Automation.PSO { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileIdleTimeoutInMinute = (int?) content.GetValueForProperty("NatGatewayProfileIdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileIdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } + if (content.Contains("StaticEgressGatewayProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).StaticEgressGatewayProfileEnabled = (bool?) content.GetValueForProperty("StaticEgressGatewayProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).StaticEgressGatewayProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ObservabilityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).ObservabilityEnabled = (bool?) content.GetValueForProperty("ObservabilityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).ObservabilityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).SecurityEnabled = (bool?) content.GetValueForProperty("SecurityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).SecurityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityAdvancedNetworkPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).SecurityAdvancedNetworkPolicy = (string) content.GetValueForProperty("SecurityAdvancedNetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).SecurityAdvancedNetworkPolicy, global::System.Convert.ToString); + } if (content.Contains("ManagedOutboundIPCount")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ContainerServiceNetworkProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ContainerServiceNetworkProfile.cs index 8ce9b25a53aa..2b04e876dcf3 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ContainerServiceNetworkProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ContainerServiceNetworkProfile.cs @@ -13,32 +13,40 @@ public partial class ContainerServiceNetworkProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal { - /// Backing field for property. - private string _dnsServiceIP; + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking _advancedNetworking; /// - /// An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified - /// in serviceCidr. + /// Advanced Networking profile for enabling observability and security feature suite on a cluster. For more information see + /// aka.ms/aksadvancednetworking. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string DnsServiceIP { get => this._dnsServiceIP; set => this._dnsServiceIP = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking AdvancedNetworking { get => (this._advancedNetworking = this._advancedNetworking ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworking()); set => this._advancedNetworking = value; } + + /// + /// Indicates the enablement of Advanced Networking functionalities of observability and security on AKS clusters. When this + /// is set to true, all observability and security features will be set to enabled unless explicitly disabled. If not specified, + /// the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AdvancedNetworkingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)AdvancedNetworking).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)AdvancedNetworking).Enabled = value ?? default(bool); } - /// Backing field for property. - private string _dockerBridgeCidr; + /// Backing field for property. + private string _dnsServiceIP; /// - /// A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes - /// service address range. + /// An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified + /// in serviceCidr. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string DockerBridgeCidr { get => this._dockerBridgeCidr; set => this._dockerBridgeCidr = value; } + public string DnsServiceIP { get => this._dnsServiceIP; set => this._dnsServiceIP = value; } /// Backing field for property. private System.Collections.Generic.List _iPFamily; /// - /// IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For - /// dual-stack, the expected values are IPv4 and IPv6. + /// The IP families used to specify IP versions available to the cluster. IP families are used to determine single-stack or + /// dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and IPv6. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public System.Collections.Generic.List IPFamily { get => this._iPFamily; set => this._iPFamily = value; } @@ -57,9 +65,13 @@ public partial class ContainerServiceNetworkProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public int? LoadBalancerProfileAllocatedOutboundPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).AllocatedOutboundPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).AllocatedOutboundPort = value ?? default(int); } + /// The type of the managed inbound Load Balancer BackendPool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string LoadBalancerProfileBackendPoolType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).BackendPoolType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).BackendPoolType = value ?? null; } + /// The effective outbound IP resources of the cluster load balancer. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public System.Collections.Generic.List LoadBalancerProfileEffectiveOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).EffectiveOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).EffectiveOutboundIP = value ?? null /* arrayOf */; } + public System.Collections.Generic.List LoadBalancerProfileEffectiveOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).EffectiveOutboundIP; } /// Enable multiple standard load balancers per AKS cluster or not. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] @@ -76,8 +88,8 @@ public partial class ContainerServiceNetworkProfile : private string _loadBalancerSku; /// - /// The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more - /// information about the differences between load balancer SKUs. + /// The load balancer sku for the managed cluster. The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) + /// for more information about the differences between load balancer SKUs. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string LoadBalancerSku { get => this._loadBalancerSku; set => this._loadBalancerSku = value; } @@ -103,23 +115,41 @@ public partial class ContainerServiceNetworkProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public int? ManagedOutboundIPProfileCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).ManagedOutboundIPProfileCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).ManagedOutboundIPProfileCount = value ?? default(int); } + /// Internal Acessors for AdvancedNetworking + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.AdvancedNetworking { get => (this._advancedNetworking = this._advancedNetworking ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworking()); set { {_advancedNetworking = value;} } } + + /// Internal Acessors for AdvancedNetworkingObservability + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.AdvancedNetworkingObservability { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)AdvancedNetworking).Observability; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)AdvancedNetworking).Observability = value ?? null /* model class */; } + + /// Internal Acessors for AdvancedNetworkingSecurity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.AdvancedNetworkingSecurity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)AdvancedNetworking).Security; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)AdvancedNetworking).Security = value ?? null /* model class */; } + /// Internal Acessors for LoadBalancerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.LoadBalancerProfile { get => (this._loadBalancerProfile = this._loadBalancerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterLoadBalancerProfile()); set { {_loadBalancerProfile = value;} } } + /// Internal Acessors for LoadBalancerProfileEffectiveOutboundIP + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.LoadBalancerProfileEffectiveOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).EffectiveOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).EffectiveOutboundIP = value ?? null /* arrayOf */; } + /// Internal Acessors for LoadBalancerProfileManagedOutboundIP - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileManagedOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.LoadBalancerProfileManagedOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).ManagedOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).ManagedOutboundIP = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileManagedOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.LoadBalancerProfileManagedOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).ManagedOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).ManagedOutboundIP = value ?? null /* model class */; } /// Internal Acessors for LoadBalancerProfileOutboundIP - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.LoadBalancerProfileOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIP = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.LoadBalancerProfileOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIP = value ?? null /* model class */; } /// Internal Acessors for LoadBalancerProfileOutboundIPPrefix - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileOutboundIPPrefixes Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.LoadBalancerProfileOutboundIPPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPrefix = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileOutboundIPPrefixes Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.LoadBalancerProfileOutboundIPPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPrefix = value ?? null /* model class */; } /// Internal Acessors for NatGatewayProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.NatGatewayProfile { get => (this._natGatewayProfile = this._natGatewayProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNatGatewayProfile()); set { {_natGatewayProfile = value;} } } + /// Internal Acessors for NatGatewayProfileEffectiveOutboundIP + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.NatGatewayProfileEffectiveOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).EffectiveOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).EffectiveOutboundIP = value ?? null /* arrayOf */; } + /// Internal Acessors for NatGatewayProfileManagedOutboundIPProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterManagedOutboundIPProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.NatGatewayProfileManagedOutboundIPProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).ManagedOutboundIPProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).ManagedOutboundIPProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterManagedOutboundIPProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.NatGatewayProfileManagedOutboundIPProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).ManagedOutboundIPProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).ManagedOutboundIPProfile = value ?? null /* model class */; } + + /// Internal Acessors for StaticEgressGatewayProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfileInternal.StaticEgressGatewayProfile { get => (this._staticEgressGatewayProfile = this._staticEgressGatewayProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStaticEgressGatewayProfile()); set { {_staticEgressGatewayProfile = value;} } } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfile _natGatewayProfile; @@ -130,7 +160,7 @@ public partial class ContainerServiceNetworkProfile : /// The effective outbound IP resources of the cluster NAT gateway. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public System.Collections.Generic.List NatGatewayProfileEffectiveOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).EffectiveOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).EffectiveOutboundIP = value ?? null /* arrayOf */; } + public System.Collections.Generic.List NatGatewayProfileEffectiveOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).EffectiveOutboundIP; } /// /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value @@ -149,7 +179,9 @@ public partial class ContainerServiceNetworkProfile : /// Backing field for property. private string _networkMode; - /// This cannot be specified if networkPlugin is anything other than 'azure'. + /// + /// The network mode Azure CNI is configured with. This cannot be specified if networkPlugin is anything other than 'azure'. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string NetworkMode { get => this._networkMode; set => this._networkMode = value; } @@ -174,6 +206,12 @@ public partial class ContainerServiceNetworkProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string NetworkPolicy { get => this._networkPolicy; set => this._networkPolicy = value; } + /// + /// Indicates the enablement of Advanced Networking observability functionalities on clusters. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? ObservabilityEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)AdvancedNetworking).ObservabilityEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)AdvancedNetworking).ObservabilityEnabled = value ?? default(bool); } + /// A list of public IP prefix resources. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public System.Collections.Generic.List OutboundIPPrefixPublicIpprefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPrefixPublicIpprefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPrefixPublicIpprefix = value ?? null /* arrayOf */; } @@ -186,7 +224,8 @@ public partial class ContainerServiceNetworkProfile : private string _outboundType; /// - /// This can only be set at cluster creation time and cannot be changed later. For more information see [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). + /// The outbound (egress) routing method. This can only be set at cluster creation time and cannot be changed later. For more + /// information see [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string OutboundType { get => this._outboundType; set => this._outboundType = value; } @@ -202,12 +241,28 @@ public partial class ContainerServiceNetworkProfile : private System.Collections.Generic.List _podCidrs; /// - /// One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for - /// dual-stack networking. + /// The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected for single-stack networking. Two CIDRs, + /// one for each IP family (IPv4/IPv6), is expected for dual-stack networking. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public System.Collections.Generic.List PodCidrs { get => this._podCidrs; set => this._podCidrs = value; } + /// + /// Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies + /// themselves must be configured via the Cilium Network Policy resources, see https://docs.cilium.io/en/latest/security/policy/index.html. + /// This can be enabled only on cilium-based clusters. If not specified, the default value is FQDN if security.enabled is + /// set to true. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string SecurityAdvancedNetworkPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)AdvancedNetworking).SecurityAdvancedNetworkPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)AdvancedNetworking).SecurityAdvancedNetworkPolicy = value ?? null; } + + /// + /// This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based + /// clusters. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? SecurityEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)AdvancedNetworking).SecurityEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingInternal)AdvancedNetworking).SecurityEnabled = value ?? default(bool); } + /// Backing field for property. private string _serviceCidr; @@ -221,12 +276,28 @@ public partial class ContainerServiceNetworkProfile : private System.Collections.Generic.List _serviceCidrs; /// - /// One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for - /// dual-stack networking. They must not overlap with any Subnet IP ranges. + /// The CIDR notation IP ranges from which to assign service cluster IPs. One IPv4 CIDR is expected for single-stack networking. + /// Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. They must not overlap with any Subnet + /// IP ranges. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public System.Collections.Generic.List ServiceCidrs { get => this._serviceCidrs; set => this._serviceCidrs = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile _staticEgressGatewayProfile; + + /// + /// The profile for Static Egress Gateway addon. For more details about Static Egress Gateway, see https://aka.ms/aks/static-egress-gateway. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile StaticEgressGatewayProfile { get => (this._staticEgressGatewayProfile = this._staticEgressGatewayProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStaticEgressGatewayProfile()); set => this._staticEgressGatewayProfile = value; } + + /// + /// Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled or not. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? StaticEgressGatewayProfileEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfileInternal)StaticEgressGatewayProfile).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfileInternal)StaticEgressGatewayProfile).Enabled = value ?? default(bool); } + /// Creates an new instance. public ContainerServiceNetworkProfile() { @@ -238,8 +309,9 @@ public partial interface IContainerServiceNetworkProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { /// - /// An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified - /// in serviceCidr. + /// Indicates the enablement of Advanced Networking functionalities of observability and security on AKS clusters. When this + /// is set to true, all observability and security features will be set to enabled unless explicitly disabled. If not specified, + /// the default is false. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -247,13 +319,13 @@ public partial interface IContainerServiceNetworkProfile : Read = true, Create = true, Update = true, - Description = @"An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.", - SerializedName = @"dnsServiceIP", - PossibleTypes = new [] { typeof(string) })] - string DnsServiceIP { get; set; } + Description = @"Indicates the enablement of Advanced Networking functionalities of observability and security on AKS clusters. When this is set to true, all observability and security features will be set to enabled unless explicitly disabled. If not specified, the default is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? AdvancedNetworkingEnabled { get; set; } /// - /// A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes - /// service address range. + /// An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified + /// in serviceCidr. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -261,13 +333,13 @@ public partial interface IContainerServiceNetworkProfile : Read = true, Create = true, Update = true, - Description = @"A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range.", - SerializedName = @"dockerBridgeCidr", + Description = @"An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.", + SerializedName = @"dnsServiceIP", PossibleTypes = new [] { typeof(string) })] - string DockerBridgeCidr { get; set; } + string DnsServiceIP { get; set; } /// - /// IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For - /// dual-stack, the expected values are IPv4 and IPv6. + /// The IP families used to specify IP versions available to the cluster. IP families are used to determine single-stack or + /// dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and IPv6. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -275,7 +347,7 @@ public partial interface IContainerServiceNetworkProfile : Read = true, Create = true, Update = true, - Description = @"IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and IPv6.", + Description = @"The IP families used to specify IP versions available to the cluster. IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and IPv6.", SerializedName = @"ipFamilies", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("IPv4", "IPv6")] @@ -294,17 +366,29 @@ public partial interface IContainerServiceNetworkProfile : SerializedName = @"allocatedOutboundPorts", PossibleTypes = new [] { typeof(int) })] int? LoadBalancerProfileAllocatedOutboundPort { get; set; } - /// The effective outbound IP resources of the cluster load balancer. + /// The type of the managed inbound Load Balancer BackendPool. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, + Description = @"The type of the managed inbound Load Balancer BackendPool.", + SerializedName = @"backendPoolType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("NodeIPConfiguration", "NodeIP")] + string LoadBalancerProfileBackendPoolType { get; set; } + /// The effective outbound IP resources of the cluster load balancer. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The effective outbound IP resources of the cluster load balancer.", SerializedName = @"effectiveOutboundIPs", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceReference) })] - System.Collections.Generic.List LoadBalancerProfileEffectiveOutboundIP { get; set; } + System.Collections.Generic.List LoadBalancerProfileEffectiveOutboundIP { get; } /// Enable multiple standard load balancers per AKS cluster or not. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -331,8 +415,8 @@ public partial interface IContainerServiceNetworkProfile : PossibleTypes = new [] { typeof(int) })] int? LoadBalancerProfileIdleTimeoutInMinute { get; set; } /// - /// The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more - /// information about the differences between load balancer SKUs. + /// The load balancer sku for the managed cluster. The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) + /// for more information about the differences between load balancer SKUs. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -340,7 +424,7 @@ public partial interface IContainerServiceNetworkProfile : Read = true, Create = true, Update = true, - Description = @"The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more information about the differences between load balancer SKUs.", + Description = @"The load balancer sku for the managed cluster. The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more information about the differences between load balancer SKUs.", SerializedName = @"loadBalancerSku", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("standard", "basic")] @@ -390,14 +474,14 @@ public partial interface IContainerServiceNetworkProfile : /// The effective outbound IP resources of the cluster NAT gateway. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Read = true, - Create = true, - Update = true, + Create = false, + Update = false, Description = @"The effective outbound IP resources of the cluster NAT gateway.", SerializedName = @"effectiveOutboundIPs", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceReference) })] - System.Collections.Generic.List NatGatewayProfileEffectiveOutboundIP { get; set; } + System.Collections.Generic.List NatGatewayProfileEffectiveOutboundIP { get; } /// /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value /// is 4 minutes. @@ -424,14 +508,16 @@ public partial interface IContainerServiceNetworkProfile : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("azure", "cilium")] string NetworkDataplane { get; set; } - /// This cannot be specified if networkPlugin is anything other than 'azure'. + /// + /// The network mode Azure CNI is configured with. This cannot be specified if networkPlugin is anything other than 'azure'. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"This cannot be specified if networkPlugin is anything other than 'azure'.", + Description = @"The network mode Azure CNI is configured with. This cannot be specified if networkPlugin is anything other than 'azure'.", SerializedName = @"networkMode", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("transparent", "bridge")] @@ -470,8 +556,21 @@ public partial interface IContainerServiceNetworkProfile : Description = @"Network policy used for building the Kubernetes network.", SerializedName = @"networkPolicy", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("calico", "azure", "cilium")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("none", "calico", "azure", "cilium")] string NetworkPolicy { get; set; } + /// + /// Indicates the enablement of Advanced Networking observability functionalities on clusters. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates the enablement of Advanced Networking observability functionalities on clusters.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? ObservabilityEnabled { get; set; } /// A list of public IP prefix resources. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -495,7 +594,8 @@ public partial interface IContainerServiceNetworkProfile : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceReference) })] System.Collections.Generic.List OutboundIPPublicIP { get; set; } /// - /// This can only be set at cluster creation time and cannot be changed later. For more information see [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). + /// The outbound (egress) routing method. This can only be set at cluster creation time and cannot be changed later. For more + /// information see [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -503,10 +603,10 @@ public partial interface IContainerServiceNetworkProfile : Read = true, Create = true, Update = true, - Description = @"This can only be set at cluster creation time and cannot be changed later. For more information see [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype).", + Description = @"The outbound (egress) routing method. This can only be set at cluster creation time and cannot be changed later. For more information see [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype).", SerializedName = @"outboundType", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("loadBalancer", "userDefinedRouting", "managedNATGateway", "userAssignedNATGateway")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("loadBalancer", "userDefinedRouting", "managedNATGateway", "userAssignedNATGateway", "none")] string OutboundType { get; set; } /// A CIDR notation IP range from which to assign pod IPs when kubenet is used. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -520,8 +620,8 @@ public partial interface IContainerServiceNetworkProfile : PossibleTypes = new [] { typeof(string) })] string PodCidr { get; set; } /// - /// One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for - /// dual-stack networking. + /// The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected for single-stack networking. Two CIDRs, + /// one for each IP family (IPv4/IPv6), is expected for dual-stack networking. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -529,11 +629,42 @@ public partial interface IContainerServiceNetworkProfile : Read = true, Create = true, Update = true, - Description = @"One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking.", + Description = @"The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking.", SerializedName = @"podCidrs", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List PodCidrs { get; set; } /// + /// Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies + /// themselves must be configured via the Cilium Network Policy resources, see https://docs.cilium.io/en/latest/security/policy/index.html. + /// This can be enabled only on cilium-based clusters. If not specified, the default value is FQDN if security.enabled is + /// set to true. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies themselves must be configured via the Cilium Network Policy resources, see https://docs.cilium.io/en/latest/security/policy/index.html. This can be enabled only on cilium-based clusters. If not specified, the default value is FQDN if security.enabled is set to true.", + SerializedName = @"advancedNetworkPolicies", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("L7", "FQDN", "None")] + string SecurityAdvancedNetworkPolicy { get; set; } + /// + /// This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based + /// clusters. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based clusters. If not specified, the default is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityEnabled { get; set; } + /// /// A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -547,8 +678,9 @@ public partial interface IContainerServiceNetworkProfile : PossibleTypes = new [] { typeof(string) })] string ServiceCidr { get; set; } /// - /// One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for - /// dual-stack networking. They must not overlap with any Subnet IP ranges. + /// The CIDR notation IP ranges from which to assign service cluster IPs. One IPv4 CIDR is expected for single-stack networking. + /// Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. They must not overlap with any Subnet + /// IP ranges. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -556,29 +688,54 @@ public partial interface IContainerServiceNetworkProfile : Read = true, Create = true, Update = true, - Description = @"One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. They must not overlap with any Subnet IP ranges.", + Description = @"The CIDR notation IP ranges from which to assign service cluster IPs. One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. They must not overlap with any Subnet IP ranges.", SerializedName = @"serviceCidrs", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List ServiceCidrs { get; set; } + /// + /// Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled or not. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled or not.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? StaticEgressGatewayProfileEnabled { get; set; } } /// Profile of network configuration. internal partial interface IContainerServiceNetworkProfileInternal { + /// + /// Advanced Networking profile for enabling observability and security feature suite on a cluster. For more information see + /// aka.ms/aksadvancednetworking. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworking AdvancedNetworking { get; set; } + /// + /// Indicates the enablement of Advanced Networking functionalities of observability and security on AKS clusters. When this + /// is set to true, all observability and security features will be set to enabled unless explicitly disabled. If not specified, + /// the default is false. + /// + bool? AdvancedNetworkingEnabled { get; set; } + /// + /// Observability profile to enable advanced network metrics and flow logs with historical contexts. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingObservability AdvancedNetworkingObservability { get; set; } + /// Security profile to enable security features on cilium based cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAdvancedNetworkingSecurity AdvancedNetworkingSecurity { get; set; } /// /// An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified /// in serviceCidr. /// string DnsServiceIP { get; set; } /// - /// A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes - /// service address range. - /// - string DockerBridgeCidr { get; set; } - /// - /// IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For - /// dual-stack, the expected values are IPv4 and IPv6. + /// The IP families used to specify IP versions available to the cluster. IP families are used to determine single-stack or + /// dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and IPv6. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("IPv4", "IPv6")] System.Collections.Generic.List IPFamily { get; set; } @@ -589,6 +746,9 @@ internal partial interface IContainerServiceNetworkProfileInternal /// value is 0 which results in Azure dynamically allocating ports. /// int? LoadBalancerProfileAllocatedOutboundPort { get; set; } + /// The type of the managed inbound Load Balancer BackendPool. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("NodeIPConfiguration", "NodeIP")] + string LoadBalancerProfileBackendPoolType { get; set; } /// The effective outbound IP resources of the cluster load balancer. System.Collections.Generic.List LoadBalancerProfileEffectiveOutboundIP { get; set; } /// Enable multiple standard load balancers per AKS cluster or not. @@ -605,8 +765,8 @@ internal partial interface IContainerServiceNetworkProfileInternal /// Desired outbound IP Prefix resources for the cluster load balancer. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileOutboundIPPrefixes LoadBalancerProfileOutboundIPPrefix { get; set; } /// - /// The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more - /// information about the differences between load balancer SKUs. + /// The load balancer sku for the managed cluster. The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) + /// for more information about the differences between load balancer SKUs. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("standard", "basic")] string LoadBalancerSku { get; set; } @@ -639,7 +799,9 @@ internal partial interface IContainerServiceNetworkProfileInternal /// Network dataplane used in the Kubernetes cluster. [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("azure", "cilium")] string NetworkDataplane { get; set; } - /// This cannot be specified if networkPlugin is anything other than 'azure'. + /// + /// The network mode Azure CNI is configured with. This cannot be specified if networkPlugin is anything other than 'azure'. + /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("transparent", "bridge")] string NetworkMode { get; set; } /// Network plugin used for building the Kubernetes network. @@ -649,33 +811,60 @@ internal partial interface IContainerServiceNetworkProfileInternal [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("overlay")] string NetworkPluginMode { get; set; } /// Network policy used for building the Kubernetes network. - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("calico", "azure", "cilium")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("none", "calico", "azure", "cilium")] string NetworkPolicy { get; set; } + /// + /// Indicates the enablement of Advanced Networking observability functionalities on clusters. + /// + bool? ObservabilityEnabled { get; set; } /// A list of public IP prefix resources. System.Collections.Generic.List OutboundIPPrefixPublicIpprefix { get; set; } /// A list of public IP resources. System.Collections.Generic.List OutboundIPPublicIP { get; set; } /// - /// This can only be set at cluster creation time and cannot be changed later. For more information see [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). + /// The outbound (egress) routing method. This can only be set at cluster creation time and cannot be changed later. For more + /// information see [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("loadBalancer", "userDefinedRouting", "managedNATGateway", "userAssignedNATGateway")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("loadBalancer", "userDefinedRouting", "managedNATGateway", "userAssignedNATGateway", "none")] string OutboundType { get; set; } /// A CIDR notation IP range from which to assign pod IPs when kubenet is used. string PodCidr { get; set; } /// - /// One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for - /// dual-stack networking. + /// The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected for single-stack networking. Two CIDRs, + /// one for each IP family (IPv4/IPv6), is expected for dual-stack networking. /// System.Collections.Generic.List PodCidrs { get; set; } /// + /// Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies + /// themselves must be configured via the Cilium Network Policy resources, see https://docs.cilium.io/en/latest/security/policy/index.html. + /// This can be enabled only on cilium-based clusters. If not specified, the default value is FQDN if security.enabled is + /// set to true. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("L7", "FQDN", "None")] + string SecurityAdvancedNetworkPolicy { get; set; } + /// + /// This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based + /// clusters. If not specified, the default is false. + /// + bool? SecurityEnabled { get; set; } + /// /// A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. /// string ServiceCidr { get; set; } /// - /// One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for - /// dual-stack networking. They must not overlap with any Subnet IP ranges. + /// The CIDR notation IP ranges from which to assign service cluster IPs. One IPv4 CIDR is expected for single-stack networking. + /// Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. They must not overlap with any Subnet + /// IP ranges. /// System.Collections.Generic.List ServiceCidrs { get; set; } + /// + /// The profile for Static Egress Gateway addon. For more details about Static Egress Gateway, see https://aka.ms/aks/static-egress-gateway. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile StaticEgressGatewayProfile { get; set; } + /// + /// Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled or not. + /// + bool? StaticEgressGatewayProfileEnabled { get; set; } } } \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ContainerServiceNetworkProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ContainerServiceNetworkProfile.json.cs index e730fab5b835..7610bb9932bb 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ContainerServiceNetworkProfile.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ContainerServiceNetworkProfile.json.cs @@ -65,8 +65,10 @@ internal ContainerServiceNetworkProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.R { return; } + {_advancedNetworking = If( json?.PropertyT("advancedNetworking"), out var __jsonAdvancedNetworking) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AdvancedNetworking.FromJson(__jsonAdvancedNetworking) : _advancedNetworking;} {_loadBalancerProfile = If( json?.PropertyT("loadBalancerProfile"), out var __jsonLoadBalancerProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterLoadBalancerProfile.FromJson(__jsonLoadBalancerProfile) : _loadBalancerProfile;} {_natGatewayProfile = If( json?.PropertyT("natGatewayProfile"), out var __jsonNatGatewayProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNatGatewayProfile.FromJson(__jsonNatGatewayProfile) : _natGatewayProfile;} + {_staticEgressGatewayProfile = If( json?.PropertyT("staticEgressGatewayProfile"), out var __jsonStaticEgressGatewayProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStaticEgressGatewayProfile.FromJson(__jsonStaticEgressGatewayProfile) : _staticEgressGatewayProfile;} {_networkPlugin = If( json?.PropertyT("networkPlugin"), out var __jsonNetworkPlugin) ? (string)__jsonNetworkPlugin : (string)_networkPlugin;} {_networkPluginMode = If( json?.PropertyT("networkPluginMode"), out var __jsonNetworkPluginMode) ? (string)__jsonNetworkPluginMode : (string)_networkPluginMode;} {_networkPolicy = If( json?.PropertyT("networkPolicy"), out var __jsonNetworkPolicy) ? (string)__jsonNetworkPolicy : (string)_networkPolicy;} @@ -75,7 +77,6 @@ internal ContainerServiceNetworkProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.R {_podCidr = If( json?.PropertyT("podCidr"), out var __jsonPodCidr) ? (string)__jsonPodCidr : (string)_podCidr;} {_serviceCidr = If( json?.PropertyT("serviceCidr"), out var __jsonServiceCidr) ? (string)__jsonServiceCidr : (string)_serviceCidr;} {_dnsServiceIP = If( json?.PropertyT("dnsServiceIP"), out var __jsonDnsServiceIP) ? (string)__jsonDnsServiceIP : (string)_dnsServiceIP;} - {_dockerBridgeCidr = If( json?.PropertyT("dockerBridgeCidr"), out var __jsonDockerBridgeCidr) ? (string)__jsonDockerBridgeCidr : (string)_dockerBridgeCidr;} {_outboundType = If( json?.PropertyT("outboundType"), out var __jsonOutboundType) ? (string)__jsonOutboundType : (string)_outboundType;} {_loadBalancerSku = If( json?.PropertyT("loadBalancerSku"), out var __jsonLoadBalancerSku) ? (string)__jsonLoadBalancerSku : (string)_loadBalancerSku;} {_podCidrs = If( json?.PropertyT("podCidrs"), out var __jsonPodCidrs) ? If( __jsonPodCidrs as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _podCidrs;} @@ -115,8 +116,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } + AddIf( null != this._advancedNetworking ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._advancedNetworking.ToJson(null,serializationMode) : null, "advancedNetworking" ,container.Add ); AddIf( null != this._loadBalancerProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._loadBalancerProfile.ToJson(null,serializationMode) : null, "loadBalancerProfile" ,container.Add ); AddIf( null != this._natGatewayProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._natGatewayProfile.ToJson(null,serializationMode) : null, "natGatewayProfile" ,container.Add ); + AddIf( null != this._staticEgressGatewayProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._staticEgressGatewayProfile.ToJson(null,serializationMode) : null, "staticEgressGatewayProfile" ,container.Add ); AddIf( null != (((object)this._networkPlugin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._networkPlugin.ToString()) : null, "networkPlugin" ,container.Add ); AddIf( null != (((object)this._networkPluginMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._networkPluginMode.ToString()) : null, "networkPluginMode" ,container.Add ); AddIf( null != (((object)this._networkPolicy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._networkPolicy.ToString()) : null, "networkPolicy" ,container.Add ); @@ -125,7 +128,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro AddIf( null != (((object)this._podCidr)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._podCidr.ToString()) : null, "podCidr" ,container.Add ); AddIf( null != (((object)this._serviceCidr)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._serviceCidr.ToString()) : null, "serviceCidr" ,container.Add ); AddIf( null != (((object)this._dnsServiceIP)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._dnsServiceIP.ToString()) : null, "dnsServiceIP" ,container.Add ); - AddIf( null != (((object)this._dockerBridgeCidr)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._dockerBridgeCidr.ToString()) : null, "dockerBridgeCidr" ,container.Add ); AddIf( null != (((object)this._outboundType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._outboundType.ToString()) : null, "outboundType" ,container.Add ); AddIf( null != (((object)this._loadBalancerSku)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._loadBalancerSku.ToString()) : null, "loadBalancerSku" ,container.Add ); if (null != this._podCidrs) diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DailySchedule.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DailySchedule.PowerShell.cs new file mode 100644 index 000000000000..14846d0b5247 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DailySchedule.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// For schedules like: 'recur every day' or 'recur every 3 days'. + [System.ComponentModel.TypeConverter(typeof(DailyScheduleTypeConverter))] + public partial class DailySchedule + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DailySchedule(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IntervalDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailyScheduleInternal)this).IntervalDay = (int) content.GetValueForProperty("IntervalDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailyScheduleInternal)this).IntervalDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DailySchedule(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IntervalDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailyScheduleInternal)this).IntervalDay = (int) content.GetValueForProperty("IntervalDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailyScheduleInternal)this).IntervalDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DailySchedule(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DailySchedule(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// For schedules like: 'recur every day' or 'recur every 3 days'. + [System.ComponentModel.TypeConverter(typeof(DailyScheduleTypeConverter))] + public partial interface IDailySchedule + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DailySchedule.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DailySchedule.TypeConverter.cs new file mode 100644 index 000000000000..4d06de5e1999 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DailySchedule.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DailyScheduleTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DailySchedule.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DailySchedule.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DailySchedule.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DailySchedule.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DailySchedule.cs new file mode 100644 index 000000000000..b8e07feebed3 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DailySchedule.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// For schedules like: 'recur every day' or 'recur every 3 days'. + public partial class DailySchedule : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailyScheduleInternal + { + + /// Backing field for property. + private int _intervalDay; + + /// Specifies the number of days between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int IntervalDay { get => this._intervalDay; set => this._intervalDay = value; } + + /// Creates an new instance. + public DailySchedule() + { + + } + } + /// For schedules like: 'recur every day' or 'recur every 3 days'. + public partial interface IDailySchedule : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Specifies the number of days between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of days between each set of occurrences.", + SerializedName = @"intervalDays", + PossibleTypes = new [] { typeof(int) })] + int IntervalDay { get; set; } + + } + /// For schedules like: 'recur every day' or 'recur every 3 days'. + internal partial interface IDailyScheduleInternal + + { + /// Specifies the number of days between each set of occurrences. + int IntervalDay { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProperty.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DailySchedule.json.cs similarity index 77% rename from generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProperty.json.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/DailySchedule.json.cs index 35229d36726f..f34256472d2b 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProperty.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DailySchedule.json.cs @@ -7,8 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// OS option property. - public partial class OSOptionProperty + /// For schedules like: 'recur every day' or 'recur every 3 days'. + public partial class DailySchedule { /// @@ -54,20 +54,10 @@ public partial class OSOptionProperty partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty. - /// - /// a to deserialize from. - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new OSOptionProperty(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. - internal OSOptionProperty(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + internal DailySchedule(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -75,19 +65,28 @@ internal OSOptionProperty(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.Js { return; } - {_oSType = If( json?.PropertyT("os-type"), out var __jsonOSType) ? (string)__jsonOSType : (string)_oSType;} - {_enableFipsImage = If( json?.PropertyT("enable-fips-image"), out var __jsonEnableFipsImage) ? (bool)__jsonEnableFipsImage : _enableFipsImage;} + {_intervalDay = If( json?.PropertyT("intervalDays"), out var __jsonIntervalDays) ? (int)__jsonIntervalDays : _intervalDay;} AfterFromJson(json); } /// - /// Serializes this instance of into a . + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new DailySchedule(json) : null; + } + + /// + /// Serializes this instance of into a . /// /// The container to serialize this object into. If the caller /// passes in null, a new instance will be created and returned to the caller. /// Allows the caller to choose the depth of the serialization. See . /// - /// a serialized instance of as a . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) { @@ -99,8 +98,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } - AddIf( null != (((object)this._oSType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._oSType.ToString()) : null, "os-type" ,container.Add ); - AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean(this._enableFipsImage), "enable-fips-image" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber(this._intervalDay), "intervalDays" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DateSpan.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DateSpan.PowerShell.cs new file mode 100644 index 000000000000..da3a6d98e8a3 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DateSpan.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// A date range. For example, between '2022-12-23' and '2023-01-05'. + [System.ComponentModel.TypeConverter(typeof(DateSpanTypeConverter))] + public partial class DateSpan + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DateSpan(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Start")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpanInternal)this).Start = (global::System.DateTime) content.GetValueForProperty("Start",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpanInternal)this).Start, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("End")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpanInternal)this).End = (global::System.DateTime) content.GetValueForProperty("End",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpanInternal)this).End, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DateSpan(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Start")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpanInternal)this).Start = (global::System.DateTime) content.GetValueForProperty("Start",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpanInternal)this).Start, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("End")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpanInternal)this).End = (global::System.DateTime) content.GetValueForProperty("End",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpanInternal)this).End, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DateSpan(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DateSpan(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// A date range. For example, between '2022-12-23' and '2023-01-05'. + [System.ComponentModel.TypeConverter(typeof(DateSpanTypeConverter))] + public partial interface IDateSpan + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DateSpan.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DateSpan.TypeConverter.cs new file mode 100644 index 000000000000..e0497cfb1693 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DateSpan.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DateSpanTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DateSpan.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DateSpan.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DateSpan.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DateSpan.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DateSpan.cs new file mode 100644 index 000000000000..e12b4c6da6be --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DateSpan.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// A date range. For example, between '2022-12-23' and '2023-01-05'. + public partial class DateSpan : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpanInternal + { + + /// Backing field for property. + private global::System.DateTime _end; + + /// The end date of the date span. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public global::System.DateTime End { get => this._end; set => this._end = value; } + + /// Backing field for property. + private global::System.DateTime _start; + + /// The start date of the date span. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public global::System.DateTime Start { get => this._start; set => this._start = value; } + + /// Creates an new instance. + public DateSpan() + { + + } + } + /// A date range. For example, between '2022-12-23' and '2023-01-05'. + public partial interface IDateSpan : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The end date of the date span. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The end date of the date span.", + SerializedName = @"end", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime End { get; set; } + /// The start date of the date span. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The start date of the date span.", + SerializedName = @"start", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime Start { get; set; } + + } + /// A date range. For example, between '2022-12-23' and '2023-01-05'. + internal partial interface IDateSpanInternal + + { + /// The end date of the date span. + global::System.DateTime End { get; set; } + /// The start date of the date span. + global::System.DateTime Start { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DateSpan.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DateSpan.json.cs new file mode 100644 index 000000000000..3ebf2214567a --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DateSpan.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// A date range. For example, between '2022-12-23' and '2023-01-05'. + public partial class DateSpan + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal DateSpan(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_start = If( json?.PropertyT("start"), out var __jsonStart) ? global::System.DateTime.TryParse((string)__jsonStart, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartValue) ? __jsonStartValue : _start : _start;} + {_end = If( json?.PropertyT("end"), out var __jsonEnd) ? global::System.DateTime.TryParse((string)__jsonEnd, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndValue) ? __jsonEndValue : _end : _end;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new DateSpan(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._start.ToString(@"yyyy-MM-dd",global::System.Globalization.CultureInfo.InvariantCulture)), "start" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._end.ToString(@"yyyy-MM-dd",global::System.Globalization.CultureInfo.InvariantCulture)), "end" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/CloudErrorBody.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResource.PowerShell.cs similarity index 65% rename from generated/Aks/Aks.Autorest/generated/api/Models/CloudErrorBody.PowerShell.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResource.PowerShell.cs index f182f1a99495..8b01ca50e76e 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/CloudErrorBody.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResource.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// An error response from the Container service. - [System.ComponentModel.TypeConverter(typeof(CloudErrorBodyTypeConverter))] - public partial class CloudErrorBody + /// Delegated resource properties - internal use only. + [System.ComponentModel.TypeConverter(typeof(DelegatedResourceTypeConverter))] + public partial class DelegatedResource { /// @@ -63,11 +63,11 @@ public partial class CloudErrorBody partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal CloudErrorBody(global::System.Collections.IDictionary content) + internal DelegatedResource(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -76,31 +76,31 @@ internal CloudErrorBody(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("Code")) + if (content.Contains("ResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).ResourceId, global::System.Convert.ToString); } - if (content.Contains("Message")) + if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).TenantId, global::System.Convert.ToString); } - if (content.Contains("Target")) + if (content.Contains("ReferralResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).ReferralResource = (string) content.GetValueForProperty("ReferralResource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).ReferralResource, global::System.Convert.ToString); } - if (content.Contains("Detail")) + if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).Location, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal CloudErrorBody(global::System.Management.Automation.PSObject content) + internal DelegatedResource(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -109,57 +109,57 @@ internal CloudErrorBody(global::System.Management.Automation.PSObject content) return; } // actually deserialize - if (content.Contains("Code")) + if (content.Contains("ResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).ResourceId, global::System.Convert.ToString); } - if (content.Contains("Message")) + if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).TenantId, global::System.Convert.ToString); } - if (content.Contains("Target")) + if (content.Contains("ReferralResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).ReferralResource = (string) content.GetValueForProperty("ReferralResource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).ReferralResource, global::System.Convert.ToString); } - if (content.Contains("Detail")) + if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal)this).Location, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new CloudErrorBody(content); + return new DelegatedResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new CloudErrorBody(content); + return new DelegatedResource(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -178,9 +178,9 @@ public override string ToString() return ToJsonString(); } } - /// An error response from the Container service. - [System.ComponentModel.TypeConverter(typeof(CloudErrorBodyTypeConverter))] - public partial interface ICloudErrorBody + /// Delegated resource properties - internal use only. + [System.ComponentModel.TypeConverter(typeof(DelegatedResourceTypeConverter))] + public partial interface IDelegatedResource { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResource.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResource.TypeConverter.cs new file mode 100644 index 000000000000..2b555fdab922 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResource.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DelegatedResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DelegatedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DelegatedResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DelegatedResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResource.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResource.cs new file mode 100644 index 000000000000..3f3b537aef84 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResource.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Delegated resource properties - internal use only. + public partial class DelegatedResource : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResource, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourceInternal + { + + /// Backing field for property. + private string _location; + + /// The source resource location - internal use only. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private string _referralResource; + + /// The delegation id of the referral delegation (optional) - internal use only. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ReferralResource { get => this._referralResource; set => this._referralResource = value; } + + /// Backing field for property. + private string _resourceId; + + /// The ARM resource id of the delegated resource - internal use only. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ResourceId { get => this._resourceId; set => this._resourceId = value; } + + /// Backing field for property. + private string _tenantId; + + /// The tenant id of the delegated resource - internal use only. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string TenantId { get => this._tenantId; set => this._tenantId = value; } + + /// Creates an new instance. + public DelegatedResource() + { + + } + } + /// Delegated resource properties - internal use only. + public partial interface IDelegatedResource : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The source resource location - internal use only. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The source resource location - internal use only.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// The delegation id of the referral delegation (optional) - internal use only. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The delegation id of the referral delegation (optional) - internal use only.", + SerializedName = @"referralResource", + PossibleTypes = new [] { typeof(string) })] + string ReferralResource { get; set; } + /// The ARM resource id of the delegated resource - internal use only. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The ARM resource id of the delegated resource - internal use only.", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + string ResourceId { get; set; } + /// The tenant id of the delegated resource - internal use only. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The tenant id of the delegated resource - internal use only.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string TenantId { get; set; } + + } + /// Delegated resource properties - internal use only. + internal partial interface IDelegatedResourceInternal + + { + /// The source resource location - internal use only. + string Location { get; set; } + /// The delegation id of the referral delegation (optional) - internal use only. + string ReferralResource { get; set; } + /// The ARM resource id of the delegated resource - internal use only. + string ResourceId { get; set; } + /// The tenant id of the delegated resource - internal use only. + string TenantId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResource.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResource.json.cs new file mode 100644 index 000000000000..a4138f4502b5 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResource.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Delegated resource properties - internal use only. + public partial class DelegatedResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal DelegatedResource(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)_resourceId;} + {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)_tenantId;} + {_referralResource = If( json?.PropertyT("referralResource"), out var __jsonReferralResource) ? (string)__jsonReferralResource : (string)_referralResource;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new DelegatedResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._resourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._resourceId.ToString()) : null, "resourceId" ,container.Add ); + AddIf( null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId" ,container.Add ); + AddIf( null != (((object)this._referralResource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._referralResource.ToString()) : null, "referralResource" ,container.Add ); + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.PowerShell.cs new file mode 100644 index 000000000000..92de9f0593f9 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// The set of delegated resources. The delegated resources dictionary keys will be source resource internal ids - internal + /// use only. + /// + [System.ComponentModel.TypeConverter(typeof(DelegatedResourcesTypeConverter))] + public partial class DelegatedResources + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DelegatedResources(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DelegatedResources(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DelegatedResources(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DelegatedResources(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The set of delegated resources. The delegated resources dictionary keys will be source resource internal ids - internal + /// use only. + [System.ComponentModel.TypeConverter(typeof(DelegatedResourcesTypeConverter))] + public partial interface IDelegatedResources + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.TypeConverter.cs new file mode 100644 index 000000000000..de0acab6ed91 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DelegatedResourcesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DelegatedResources.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DelegatedResources.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DelegatedResources.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.cs new file mode 100644 index 000000000000..9330fc24f1b1 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// The set of delegated resources. The delegated resources dictionary keys will be source resource internal ids - internal + /// use only. + /// + public partial class DelegatedResources : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResourcesInternal + { + + /// Creates an new instance. + public DelegatedResources() + { + + } + } + /// The set of delegated resources. The delegated resources dictionary keys will be source resource internal ids - internal + /// use only. + public partial interface IDelegatedResources : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray + { + + } + /// The set of delegated resources. The delegated resources dictionary keys will be source resource internal ids - internal + /// use only. + internal partial interface IDelegatedResourcesInternal + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.dictionary.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.dictionary.cs new file mode 100644 index 000000000000..a4328aac8d57 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + public partial class DelegatedResources : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResource this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResource value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResource value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DelegatedResources source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.json.cs new file mode 100644 index 000000000000..97f3922dc339 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/DelegatedResources.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// The set of delegated resources. The delegated resources dictionary keys will be source resource internal ids - internal + /// use only. + /// + public partial class DelegatedResources + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + /// + internal DelegatedResources(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DelegatedResource.FromJson(j) ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new DelegatedResources(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs new file mode 100644 index 000000000000..3876b0df58ca --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The resource management error additional info. + [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))] + public partial class ErrorAdditionalInfo + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorAdditionalInfo(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorAdditionalInfo(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorAdditionalInfo(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AnyTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AnyTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The resource management error additional info. + [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))] + public partial interface IErrorAdditionalInfo + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs new file mode 100644 index 000000000000..eb2ca03c664b --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorAdditionalInfoTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorAdditionalInfo.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorAdditionalInfo.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorAdditionalInfo.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ErrorAdditionalInfo.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorAdditionalInfo.cs new file mode 100644 index 000000000000..19f113edf729 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorAdditionalInfo.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny _info; + + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Any()); } + + /// Internal Acessors for Info + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Any()); set { {_info = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _type; + + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public ErrorAdditionalInfo() + { + + } + } + /// The resource management error additional info. + public partial interface IErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The additional info.", + SerializedName = @"info", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny Info { get; } + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The additional info type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// The resource management error additional info. + internal partial interface IErrorAdditionalInfoInternal + + { + /// The additional info. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAny Info { get; set; } + /// The additional info type. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs similarity index 72% rename from generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProfile.json.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs index fa36fc9514fa..392a73fd3d58 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProfile.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs @@ -7,8 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// The OS option profile. - public partial class OSOptionProfile + /// The resource management error additional info. + public partial class ErrorAdditionalInfo { /// @@ -54,20 +54,10 @@ public partial class OSOptionProfile partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile. - /// - /// a to deserialize from. - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new OSOptionProfile(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. - internal OSOptionProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -75,21 +65,31 @@ internal OSOptionProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.Jso { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionPropertyList.FromJson(__jsonProperties) : _property;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Any.FromJson(__jsonInfo) : _info;} AfterFromJson(json); } /// - /// Serializes this instance of into a . + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; + } + + /// + /// Serializes this instance of into a . /// /// The container to serialize this object into. If the caller /// passes in null, a new instance will be created and returned to the caller. /// Allows the caller to choose the depth of the serialization. See . /// - /// a serialized instance of as a . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) { @@ -101,18 +101,13 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) { - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) { - AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); } AfterToJson(ref container); return container; diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/CloudError.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs similarity index 63% rename from generated/Aks/Aks.Autorest/generated/api/Models/CloudError.PowerShell.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs index 75f8be685510..6b4a66714864 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/CloudError.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// An error response from the Container service. - [System.ComponentModel.TypeConverter(typeof(CloudErrorTypeConverter))] - public partial class CloudError + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial class ErrorDetail { /// @@ -63,11 +63,37 @@ public partial class CloudError partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal CloudError(global::System.Collections.IDictionary content) + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorDetail(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -76,35 +102,35 @@ internal CloudError(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudErrorBodyTypeConverter.ConvertFrom); - } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal CloudError(global::System.Management.Automation.PSObject content) + internal ErrorDetail(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -113,61 +139,35 @@ internal CloudError(global::System.Management.Automation.PSObject content) return; } // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudErrorBodyTypeConverter.ConvertFrom); - } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CloudError(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CloudError(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -186,9 +186,9 @@ public override string ToString() return ToJsonString(); } } - /// An error response from the Container service. - [System.ComponentModel.TypeConverter(typeof(CloudErrorTypeConverter))] - public partial interface ICloudError + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial interface IErrorDetail { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs new file mode 100644 index 000000000000..7a9904ec1c9b --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorDetailTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorDetail.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorDetail.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorDetail.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ErrorDetail.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorDetail.cs new file mode 100644 index 000000000000..49e51d4a4ca9 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorDetail.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _additionalInfo; + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List AdditionalInfo { get => this._additionalInfo; } + + /// Backing field for property. + private string _code; + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private System.Collections.Generic.List _detail; + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Detail { get => this._detail; } + + /// Backing field for property. + private string _message; + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for AdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Detail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + + /// Backing field for property. + private string _target; + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Target { get => this._target; } + + /// Creates an new instance. + public ErrorDetail() + { + + } + } + /// The error detail. + public partial interface IErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// The error detail. + internal partial interface IErrorDetailInternal + + { + /// The error additional info. + System.Collections.Generic.List AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + System.Collections.Generic.List Detail { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ErrorDetail.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorDetail.json.cs new file mode 100644 index 000000000000..a17cabd040c7 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorDetail.json.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)_target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetail.FromJson(__u) )) ))() : null : _detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : _additionalInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._additionalInfo) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __s in this._additionalInfo ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("additionalInfo",__r); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs new file mode 100644 index 000000000000..b2ba66fadc07 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial class ErrorResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial interface IErrorResponse + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs new file mode 100644 index 000000000000..c3c33a949750 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ErrorResponse.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorResponse.cs new file mode 100644 index 000000000000..a528a7631ab5 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorResponse.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail _error; + + /// The error object. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetail()); set => this._error = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).AdditionalInfo = value ?? null /* arrayOf */; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).Code = value ?? null; } + + /// Internal Acessors for Detail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).Detail = value ?? null /* arrayOf */; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).Message = value ?? null; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).Target = value ?? null; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)Error).Target; } + + /// Creates an new instance. + public ErrorResponse() + { + + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + public partial interface IErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + internal partial interface IErrorResponseInternal + + { + /// The error additional info. + System.Collections.Generic.List AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + System.Collections.Generic.List Detail { get; set; } + /// The error object. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail Error { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ErrorResponse.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorResponse.json.cs new file mode 100644 index 000000000000..34357ad32657 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ErrorResponse.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetail.FromJson(__jsonError) : _error;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/GpuProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/GpuProfile.PowerShell.cs new file mode 100644 index 000000000000..0c77dfc5245f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/GpuProfile.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// GPU settings for the Agent Pool. + [System.ComponentModel.TypeConverter(typeof(GpuProfileTypeConverter))] + public partial class GpuProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GpuProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GpuProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GpuProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Driver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfileInternal)this).Driver = (string) content.GetValueForProperty("Driver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfileInternal)this).Driver, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GpuProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Driver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfileInternal)this).Driver = (string) content.GetValueForProperty("Driver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfileInternal)this).Driver, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// GPU settings for the Agent Pool. + [System.ComponentModel.TypeConverter(typeof(GpuProfileTypeConverter))] + public partial interface IGpuProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/CloudError.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/GpuProfile.TypeConverter.cs similarity index 89% rename from generated/Aks/Aks.Autorest/generated/api/Models/CloudError.TypeConverter.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/GpuProfile.TypeConverter.cs index c21b80090a96..ae30989d76aa 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/CloudError.TypeConverter.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/GpuProfile.TypeConverter.cs @@ -8,9 +8,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class CloudErrorTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class GpuProfileTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,12 +26,12 @@ public partial class CloudErrorTypeConverter : global::System.Management.Automat public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the type. + /// Determines if the converter can convert the parameter to the type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -94,31 +94,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// not used by this TypeConverter. /// when set to true, will ignore the case when converting. /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter into an instance of + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile).IsAssignableFrom(type)) { return sourceValue; } try { - return CloudError.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return GpuProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -126,11 +126,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError ConvertF } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return CloudError.DeserializeFromPSObject(sourceValue); + return GpuProfile.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return CloudError.DeserializeFromDictionary(sourceValue); + return GpuProfile.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/GpuProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/GpuProfile.cs new file mode 100644 index 000000000000..6ffa34a91230 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/GpuProfile.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// GPU settings for the Agent Pool. + public partial class GpuProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfileInternal + { + + /// Backing field for property. + private string _driver; + + /// Whether to install GPU drivers. When it's not specified, default is Install. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Driver { get => this._driver; set => this._driver = value; } + + /// Creates an new instance. + public GpuProfile() + { + + } + } + /// GPU settings for the Agent Pool. + public partial interface IGpuProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to install GPU drivers. When it's not specified, default is Install. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to install GPU drivers. When it's not specified, default is Install.", + SerializedName = @"driver", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Install", "None")] + string Driver { get; set; } + + } + /// GPU settings for the Agent Pool. + internal partial interface IGpuProfileInternal + + { + /// Whether to install GPU drivers. When it's not specified, default is Install. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Install", "None")] + string Driver { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/CloudError.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/GpuProfile.json.cs similarity index 84% rename from generated/Aks/Aks.Autorest/generated/api/Models/CloudError.json.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/GpuProfile.json.cs index 2252fa3a1063..c023f207afd3 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/CloudError.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/GpuProfile.json.cs @@ -7,8 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// An error response from the Container service. - public partial class CloudError + /// GPU settings for the Agent Pool. + public partial class GpuProfile { /// @@ -54,10 +54,20 @@ public partial class CloudError partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new GpuProfile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. - internal CloudError(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + internal GpuProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -65,28 +75,18 @@ internal CloudError(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObje { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudErrorBody.FromJson(__jsonError) : _error;} + {_driver = If( json?.PropertyT("driver"), out var __jsonDriver) ? (string)__jsonDriver : (string)_driver;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError. - /// - /// a to deserialize from. - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new CloudError(json) : null; - } - - /// - /// Serializes this instance of into a . + /// Serializes this instance of into a . /// /// The container to serialize this object into. If the caller /// passes in null, a new instance will be created and returned to the caller. /// Allows the caller to choose the depth of the serialization. See . /// - /// a serialized instance of as a . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) { @@ -98,7 +98,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } - AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AddIf( null != (((object)this._driver)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._driver.ToString()) : null, "driver" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IPTag.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IPTag.PowerShell.cs new file mode 100644 index 000000000000..c8bbffa35287 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IPTag.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Contains the IPTag associated with the object. + [System.ComponentModel.TypeConverter(typeof(IPTagTypeConverter))] + public partial class IPTag + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTag DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new IPTag(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTag DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new IPTag(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTag FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal IPTag(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTagInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTagInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTagInternal)this).Tag = (string) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTagInternal)this).Tag, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal IPTag(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTagInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTagInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTagInternal)this).Tag = (string) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTagInternal)this).Tag, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Contains the IPTag associated with the object. + [System.ComponentModel.TypeConverter(typeof(IPTagTypeConverter))] + public partial interface IIPTag + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IPTag.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IPTag.TypeConverter.cs new file mode 100644 index 000000000000..96f050a12ab9 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IPTag.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class IPTagTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTag ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTag).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return IPTag.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return IPTag.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return IPTag.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IPTag.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IPTag.cs new file mode 100644 index 000000000000..a3ca9e03b2cf --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IPTag.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Contains the IPTag associated with the object. + public partial class IPTag : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTag, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTagInternal + { + + /// Backing field for property. + private string _tag; + + /// The value of the IP tag associated with the public IP. Example: Internet. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Tag { get => this._tag; set => this._tag = value; } + + /// Backing field for property. + private string _type; + + /// The IP tag type. Example: RoutingPreference. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public IPTag() + { + + } + } + /// Contains the IPTag associated with the object. + public partial interface IIPTag : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The value of the IP tag associated with the public IP. Example: Internet. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The value of the IP tag associated with the public IP. Example: Internet.", + SerializedName = @"tag", + PossibleTypes = new [] { typeof(string) })] + string Tag { get; set; } + /// The IP tag type. Example: RoutingPreference. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The IP tag type. Example: RoutingPreference.", + SerializedName = @"ipTagType", + PossibleTypes = new [] { typeof(string) })] + string Type { get; set; } + + } + /// Contains the IPTag associated with the object. + internal partial interface IIPTagInternal + + { + /// The value of the IP tag associated with the public IP. Example: Internet. + string Tag { get; set; } + /// The IP tag type. Example: RoutingPreference. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IPTag.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IPTag.json.cs new file mode 100644 index 000000000000..02db443ed04e --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IPTag.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Contains the IPTag associated with the object. + public partial class IPTag + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTag. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTag. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTag FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new IPTag(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal IPTag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("ipTagType"), out var __jsonIPTagType) ? (string)__jsonIPTagType : (string)_type;} + {_tag = If( json?.PropertyT("tag"), out var __jsonTag) ? (string)__jsonTag : (string)_tag;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._type.ToString()) : null, "ipTagType" ,container.Add ); + AddIf( null != (((object)this._tag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._tag.ToString()) : null, "tag" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioCertificateAuthority.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioCertificateAuthority.PowerShell.cs new file mode 100644 index 000000000000..15d4ea5c9b6c --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioCertificateAuthority.PowerShell.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described + /// here https://aka.ms/asm-plugin-ca + /// + [System.ComponentModel.TypeConverter(typeof(IstioCertificateAuthorityTypeConverter))] + public partial class IstioCertificateAuthority + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new IstioCertificateAuthority(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new IstioCertificateAuthority(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal IstioCertificateAuthority(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Plugin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).Plugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority) content.GetValueForProperty("Plugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).Plugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("PluginKeyVaultId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginKeyVaultId = (string) content.GetValueForProperty("PluginKeyVaultId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginKeyVaultId, global::System.Convert.ToString); + } + if (content.Contains("PluginCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginCertObjectName = (string) content.GetValueForProperty("PluginCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginKeyObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginKeyObjectName = (string) content.GetValueForProperty("PluginKeyObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginKeyObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginRootCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginRootCertObjectName = (string) content.GetValueForProperty("PluginRootCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginRootCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginCertChainObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginCertChainObjectName = (string) content.GetValueForProperty("PluginCertChainObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginCertChainObjectName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal IstioCertificateAuthority(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Plugin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).Plugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority) content.GetValueForProperty("Plugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).Plugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("PluginKeyVaultId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginKeyVaultId = (string) content.GetValueForProperty("PluginKeyVaultId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginKeyVaultId, global::System.Convert.ToString); + } + if (content.Contains("PluginCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginCertObjectName = (string) content.GetValueForProperty("PluginCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginKeyObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginKeyObjectName = (string) content.GetValueForProperty("PluginKeyObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginKeyObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginRootCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginRootCertObjectName = (string) content.GetValueForProperty("PluginRootCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginRootCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginCertChainObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginCertChainObjectName = (string) content.GetValueForProperty("PluginCertChainObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)this).PluginCertChainObjectName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described + /// here https://aka.ms/asm-plugin-ca + [System.ComponentModel.TypeConverter(typeof(IstioCertificateAuthorityTypeConverter))] + public partial interface IIstioCertificateAuthority + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioCertificateAuthority.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioCertificateAuthority.TypeConverter.cs new file mode 100644 index 000000000000..1d769ef54935 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioCertificateAuthority.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class IstioCertificateAuthorityTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return IstioCertificateAuthority.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return IstioCertificateAuthority.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return IstioCertificateAuthority.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioCertificateAuthority.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioCertificateAuthority.cs new file mode 100644 index 000000000000..6ae0e3ac9d99 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioCertificateAuthority.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described + /// here https://aka.ms/asm-plugin-ca + /// + public partial class IstioCertificateAuthority : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal + { + + /// Internal Acessors for Plugin + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal.Plugin { get => (this._plugin = this._plugin ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthority()); set { {_plugin = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority _plugin; + + /// Plugin certificates information for Service Mesh. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority Plugin { get => (this._plugin = this._plugin ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthority()); set => this._plugin = value; } + + /// Certificate chain object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginCertChainObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)Plugin).CertChainObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)Plugin).CertChainObjectName = value ?? null; } + + /// Intermediate certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginCertObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)Plugin).CertObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)Plugin).CertObjectName = value ?? null; } + + /// Intermediate certificate private key object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginKeyObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)Plugin).KeyObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)Plugin).KeyObjectName = value ?? null; } + + /// The resource ID of the Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginKeyVaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)Plugin).KeyVaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)Plugin).KeyVaultId = value ?? null; } + + /// Root certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginRootCertObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)Plugin).RootCertObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)Plugin).RootCertObjectName = value ?? null; } + + /// Creates an new instance. + public IstioCertificateAuthority() + { + + } + } + /// Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described + /// here https://aka.ms/asm-plugin-ca + public partial interface IIstioCertificateAuthority : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Certificate chain object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Certificate chain object name in Azure Key Vault.", + SerializedName = @"certChainObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginCertChainObjectName { get; set; } + /// Intermediate certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Intermediate certificate object name in Azure Key Vault.", + SerializedName = @"certObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginCertObjectName { get; set; } + /// Intermediate certificate private key object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Intermediate certificate private key object name in Azure Key Vault.", + SerializedName = @"keyObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginKeyObjectName { get; set; } + /// The resource ID of the Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The resource ID of the Key Vault.", + SerializedName = @"keyVaultId", + PossibleTypes = new [] { typeof(string) })] + string PluginKeyVaultId { get; set; } + /// Root certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Root certificate object name in Azure Key Vault.", + SerializedName = @"rootCertObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginRootCertObjectName { get; set; } + + } + /// Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described + /// here https://aka.ms/asm-plugin-ca + internal partial interface IIstioCertificateAuthorityInternal + + { + /// Plugin certificates information for Service Mesh. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority Plugin { get; set; } + /// Certificate chain object name in Azure Key Vault. + string PluginCertChainObjectName { get; set; } + /// Intermediate certificate object name in Azure Key Vault. + string PluginCertObjectName { get; set; } + /// Intermediate certificate private key object name in Azure Key Vault. + string PluginKeyObjectName { get; set; } + /// The resource ID of the Key Vault. + string PluginKeyVaultId { get; set; } + /// Root certificate object name in Azure Key Vault. + string PluginRootCertObjectName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioCertificateAuthority.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioCertificateAuthority.json.cs new file mode 100644 index 000000000000..6ef0d403cd27 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioCertificateAuthority.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described + /// here https://aka.ms/asm-plugin-ca + /// + public partial class IstioCertificateAuthority + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new IstioCertificateAuthority(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal IstioCertificateAuthority(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_plugin = If( json?.PropertyT("plugin"), out var __jsonPlugin) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthority.FromJson(__jsonPlugin) : _plugin;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._plugin ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._plugin.ToJson(null,serializationMode) : null, "plugin" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioComponents.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioComponents.PowerShell.cs new file mode 100644 index 000000000000..37db83b5fa0e --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioComponents.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Istio components configuration. + [System.ComponentModel.TypeConverter(typeof(IstioComponentsTypeConverter))] + public partial class IstioComponents + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new IstioComponents(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new IstioComponents(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal IstioComponents(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IngressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponentsInternal)this).IngressGateway = (System.Collections.Generic.List) content.GetValueForProperty("IngressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponentsInternal)this).IngressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioIngressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("EgressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponentsInternal)this).EgressGateway = (System.Collections.Generic.List) content.GetValueForProperty("EgressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponentsInternal)this).EgressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioEgressGatewayTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal IstioComponents(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IngressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponentsInternal)this).IngressGateway = (System.Collections.Generic.List) content.GetValueForProperty("IngressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponentsInternal)this).IngressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioIngressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("EgressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponentsInternal)this).EgressGateway = (System.Collections.Generic.List) content.GetValueForProperty("EgressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponentsInternal)this).EgressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioEgressGatewayTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Istio components configuration. + [System.ComponentModel.TypeConverter(typeof(IstioComponentsTypeConverter))] + public partial interface IIstioComponents + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioComponents.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioComponents.TypeConverter.cs new file mode 100644 index 000000000000..0b1ed2766b07 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioComponents.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class IstioComponentsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return IstioComponents.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return IstioComponents.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return IstioComponents.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioComponents.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioComponents.cs new file mode 100644 index 000000000000..98d7511c883f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioComponents.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Istio components configuration. + public partial class IstioComponents : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponentsInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _egressGateway; + + /// Istio egress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List EgressGateway { get => this._egressGateway; set => this._egressGateway = value; } + + /// Backing field for property. + private System.Collections.Generic.List _ingressGateway; + + /// Istio ingress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List IngressGateway { get => this._ingressGateway; set => this._ingressGateway = value; } + + /// Creates an new instance. + public IstioComponents() + { + + } + } + /// Istio components configuration. + public partial interface IIstioComponents : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Istio egress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Istio egress gateways.", + SerializedName = @"egressGateways", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway) })] + System.Collections.Generic.List EgressGateway { get; set; } + /// Istio ingress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Istio ingress gateways.", + SerializedName = @"ingressGateways", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway) })] + System.Collections.Generic.List IngressGateway { get; set; } + + } + /// Istio components configuration. + internal partial interface IIstioComponentsInternal + + { + /// Istio egress gateways. + System.Collections.Generic.List EgressGateway { get; set; } + /// Istio ingress gateways. + System.Collections.Generic.List IngressGateway { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioComponents.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioComponents.json.cs new file mode 100644 index 000000000000..3777c25d3111 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioComponents.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Istio components configuration. + public partial class IstioComponents + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new IstioComponents(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal IstioComponents(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_ingressGateway = If( json?.PropertyT("ingressGateways"), out var __jsonIngressGateways) ? If( __jsonIngressGateways as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioIngressGateway.FromJson(__u) )) ))() : null : _ingressGateway;} + {_egressGateway = If( json?.PropertyT("egressGateways"), out var __jsonEgressGateways) ? If( __jsonEgressGateways as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioEgressGateway.FromJson(__p) )) ))() : null : _egressGateway;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._ingressGateway) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._ingressGateway ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("ingressGateways",__w); + } + if (null != this._egressGateway) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __s in this._egressGateway ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("egressGateways",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioEgressGateway.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioEgressGateway.PowerShell.cs new file mode 100644 index 000000000000..14e00a3cd736 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioEgressGateway.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Istio egress gateway configuration. + [System.ComponentModel.TypeConverter(typeof(IstioEgressGatewayTypeConverter))] + public partial class IstioEgressGateway + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new IstioEgressGateway(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new IstioEgressGateway(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal IstioEgressGateway(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGatewayInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGatewayInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal IstioEgressGateway(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGatewayInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGatewayInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Istio egress gateway configuration. + [System.ComponentModel.TypeConverter(typeof(IstioEgressGatewayTypeConverter))] + public partial interface IIstioEgressGateway + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioEgressGateway.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioEgressGateway.TypeConverter.cs new file mode 100644 index 000000000000..8f5f54efd59e --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioEgressGateway.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class IstioEgressGatewayTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return IstioEgressGateway.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return IstioEgressGateway.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return IstioEgressGateway.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioEgressGateway.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioEgressGateway.cs new file mode 100644 index 000000000000..f191759d4777 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioEgressGateway.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Istio egress gateway configuration. + public partial class IstioEgressGateway : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGatewayInternal + { + + /// Backing field for property. + private bool _enabled; + + /// Whether to enable the egress gateway. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool Enabled { get => this._enabled; set => this._enabled = value; } + + /// Creates an new instance. + public IstioEgressGateway() + { + + } + } + /// Istio egress gateway configuration. + public partial interface IIstioEgressGateway : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable the egress gateway. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable the egress gateway.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool Enabled { get; set; } + + } + /// Istio egress gateway configuration. + internal partial interface IIstioEgressGatewayInternal + + { + /// Whether to enable the egress gateway. + bool Enabled { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioEgressGateway.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioEgressGateway.json.cs new file mode 100644 index 000000000000..79b7b457e0ca --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioEgressGateway.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Istio egress gateway configuration. + public partial class IstioEgressGateway + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new IstioEgressGateway(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal IstioEgressGateway(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool)__jsonEnabled : _enabled;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean(this._enabled), "enabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioIngressGateway.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioIngressGateway.PowerShell.cs new file mode 100644 index 000000000000..1299cae08eb2 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioIngressGateway.PowerShell.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// Istio ingress gateway configuration. For now, we support up to one external ingress gateway named `aks-istio-ingressgateway-external` + /// and one internal ingress gateway named `aks-istio-ingressgateway-internal`. + /// + [System.ComponentModel.TypeConverter(typeof(IstioIngressGatewayTypeConverter))] + public partial class IstioIngressGateway + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new IstioIngressGateway(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new IstioIngressGateway(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal IstioIngressGateway(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Mode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGatewayInternal)this).Mode = (string) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGatewayInternal)this).Mode, global::System.Convert.ToString); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGatewayInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGatewayInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal IstioIngressGateway(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Mode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGatewayInternal)this).Mode = (string) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGatewayInternal)this).Mode, global::System.Convert.ToString); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGatewayInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGatewayInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Istio ingress gateway configuration. For now, we support up to one external ingress gateway named `aks-istio-ingressgateway-external` + /// and one internal ingress gateway named `aks-istio-ingressgateway-internal`. + [System.ComponentModel.TypeConverter(typeof(IstioIngressGatewayTypeConverter))] + public partial interface IIstioIngressGateway + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioIngressGateway.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioIngressGateway.TypeConverter.cs new file mode 100644 index 000000000000..54df40253c65 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioIngressGateway.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class IstioIngressGatewayTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return IstioIngressGateway.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return IstioIngressGateway.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return IstioIngressGateway.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioIngressGateway.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioIngressGateway.cs new file mode 100644 index 000000000000..203bd4477950 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioIngressGateway.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Istio ingress gateway configuration. For now, we support up to one external ingress gateway named `aks-istio-ingressgateway-external` + /// and one internal ingress gateway named `aks-istio-ingressgateway-internal`. + /// + public partial class IstioIngressGateway : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGatewayInternal + { + + /// Backing field for property. + private bool _enabled; + + /// Whether to enable the ingress gateway. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool Enabled { get => this._enabled; set => this._enabled = value; } + + /// Backing field for property. + private string _mode; + + /// Mode of an ingress gateway. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Mode { get => this._mode; set => this._mode = value; } + + /// Creates an new instance. + public IstioIngressGateway() + { + + } + } + /// Istio ingress gateway configuration. For now, we support up to one external ingress gateway named `aks-istio-ingressgateway-external` + /// and one internal ingress gateway named `aks-istio-ingressgateway-internal`. + public partial interface IIstioIngressGateway : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable the ingress gateway. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable the ingress gateway.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool Enabled { get; set; } + /// Mode of an ingress gateway. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Mode of an ingress gateway.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("External", "Internal")] + string Mode { get; set; } + + } + /// Istio ingress gateway configuration. For now, we support up to one external ingress gateway named `aks-istio-ingressgateway-external` + /// and one internal ingress gateway named `aks-istio-ingressgateway-internal`. + internal partial interface IIstioIngressGatewayInternal + + { + /// Whether to enable the ingress gateway. + bool Enabled { get; set; } + /// Mode of an ingress gateway. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("External", "Internal")] + string Mode { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioIngressGateway.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioIngressGateway.json.cs new file mode 100644 index 000000000000..738e3e0f3d11 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioIngressGateway.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Istio ingress gateway configuration. For now, we support up to one external ingress gateway named `aks-istio-ingressgateway-external` + /// and one internal ingress gateway named `aks-istio-ingressgateway-internal`. + /// + public partial class IstioIngressGateway + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new IstioIngressGateway(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal IstioIngressGateway(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_mode = If( json?.PropertyT("mode"), out var __jsonMode) ? (string)__jsonMode : (string)_mode;} + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool)__jsonEnabled : _enabled;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._mode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._mode.ToString()) : null, "mode" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean(this._enabled), "enabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioPluginCertificateAuthority.PowerShell.cs similarity index 60% rename from generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProfile.PowerShell.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/IstioPluginCertificateAuthority.PowerShell.cs index 93c038bc3da2..792b0015bac1 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProfile.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioPluginCertificateAuthority.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// The OS option profile. - [System.ComponentModel.TypeConverter(typeof(OSOptionProfileTypeConverter))] - public partial class OSOptionProfile + /// Plugin certificates information for Service Mesh. + [System.ComponentModel.TypeConverter(typeof(IstioPluginCertificateAuthorityTypeConverter))] + public partial class IstioPluginCertificateAuthority { /// @@ -63,44 +63,44 @@ public partial class OSOptionProfile partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new OSOptionProfile(content); + return new IstioPluginCertificateAuthority(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new OSOptionProfile(content); + return new IstioPluginCertificateAuthority(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal OSOptionProfile(global::System.Collections.IDictionary content) + internal IstioPluginCertificateAuthority(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -109,35 +109,35 @@ internal OSOptionProfile(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("Property")) + if (content.Contains("KeyVaultId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionPropertyListTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).KeyVaultId = (string) content.GetValueForProperty("KeyVaultId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).KeyVaultId, global::System.Convert.ToString); } - if (content.Contains("Id")) + if (content.Contains("CertObjectName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).CertObjectName = (string) content.GetValueForProperty("CertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).CertObjectName, global::System.Convert.ToString); } - if (content.Contains("Name")) + if (content.Contains("KeyObjectName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).KeyObjectName = (string) content.GetValueForProperty("KeyObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).KeyObjectName, global::System.Convert.ToString); } - if (content.Contains("Type")) + if (content.Contains("RootCertObjectName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).RootCertObjectName = (string) content.GetValueForProperty("RootCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).RootCertObjectName, global::System.Convert.ToString); } - if (content.Contains("OSOptionPropertyList")) + if (content.Contains("CertChainObjectName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).OSOptionPropertyList = (System.Collections.Generic.List) content.GetValueForProperty("OSOptionPropertyList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).OSOptionPropertyList, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionPropertyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).CertChainObjectName = (string) content.GetValueForProperty("CertChainObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).CertChainObjectName, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal OSOptionProfile(global::System.Management.Automation.PSObject content) + internal IstioPluginCertificateAuthority(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -146,25 +146,25 @@ internal OSOptionProfile(global::System.Management.Automation.PSObject content) return; } // actually deserialize - if (content.Contains("Property")) + if (content.Contains("KeyVaultId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionPropertyListTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).KeyVaultId = (string) content.GetValueForProperty("KeyVaultId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).KeyVaultId, global::System.Convert.ToString); } - if (content.Contains("Id")) + if (content.Contains("CertObjectName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).CertObjectName = (string) content.GetValueForProperty("CertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).CertObjectName, global::System.Convert.ToString); } - if (content.Contains("Name")) + if (content.Contains("KeyObjectName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).KeyObjectName = (string) content.GetValueForProperty("KeyObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).KeyObjectName, global::System.Convert.ToString); } - if (content.Contains("Type")) + if (content.Contains("RootCertObjectName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).RootCertObjectName = (string) content.GetValueForProperty("RootCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).RootCertObjectName, global::System.Convert.ToString); } - if (content.Contains("OSOptionPropertyList")) + if (content.Contains("CertChainObjectName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).OSOptionPropertyList = (System.Collections.Generic.List) content.GetValueForProperty("OSOptionPropertyList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal)this).OSOptionPropertyList, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionPropertyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).CertChainObjectName = (string) content.GetValueForProperty("CertChainObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal)this).CertChainObjectName, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -186,9 +186,9 @@ public override string ToString() return ToJsonString(); } } - /// The OS option profile. - [System.ComponentModel.TypeConverter(typeof(OSOptionProfileTypeConverter))] - public partial interface IOSOptionProfile + /// Plugin certificates information for Service Mesh. + [System.ComponentModel.TypeConverter(typeof(IstioPluginCertificateAuthorityTypeConverter))] + public partial interface IIstioPluginCertificateAuthority { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioPluginCertificateAuthority.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioPluginCertificateAuthority.TypeConverter.cs new file mode 100644 index 000000000000..f5f01a6412e0 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioPluginCertificateAuthority.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class IstioPluginCertificateAuthorityTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return IstioPluginCertificateAuthority.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return IstioPluginCertificateAuthority.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return IstioPluginCertificateAuthority.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioPluginCertificateAuthority.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioPluginCertificateAuthority.cs new file mode 100644 index 000000000000..874f0152abd9 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioPluginCertificateAuthority.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Plugin certificates information for Service Mesh. + public partial class IstioPluginCertificateAuthority : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthorityInternal + { + + /// Backing field for property. + private string _certChainObjectName; + + /// Certificate chain object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string CertChainObjectName { get => this._certChainObjectName; set => this._certChainObjectName = value; } + + /// Backing field for property. + private string _certObjectName; + + /// Intermediate certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string CertObjectName { get => this._certObjectName; set => this._certObjectName = value; } + + /// Backing field for property. + private string _keyObjectName; + + /// Intermediate certificate private key object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string KeyObjectName { get => this._keyObjectName; set => this._keyObjectName = value; } + + /// Backing field for property. + private string _keyVaultId; + + /// The resource ID of the Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string KeyVaultId { get => this._keyVaultId; set => this._keyVaultId = value; } + + /// Backing field for property. + private string _rootCertObjectName; + + /// Root certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string RootCertObjectName { get => this._rootCertObjectName; set => this._rootCertObjectName = value; } + + /// Creates an new instance. + public IstioPluginCertificateAuthority() + { + + } + } + /// Plugin certificates information for Service Mesh. + public partial interface IIstioPluginCertificateAuthority : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Certificate chain object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Certificate chain object name in Azure Key Vault.", + SerializedName = @"certChainObjectName", + PossibleTypes = new [] { typeof(string) })] + string CertChainObjectName { get; set; } + /// Intermediate certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Intermediate certificate object name in Azure Key Vault.", + SerializedName = @"certObjectName", + PossibleTypes = new [] { typeof(string) })] + string CertObjectName { get; set; } + /// Intermediate certificate private key object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Intermediate certificate private key object name in Azure Key Vault.", + SerializedName = @"keyObjectName", + PossibleTypes = new [] { typeof(string) })] + string KeyObjectName { get; set; } + /// The resource ID of the Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The resource ID of the Key Vault.", + SerializedName = @"keyVaultId", + PossibleTypes = new [] { typeof(string) })] + string KeyVaultId { get; set; } + /// Root certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Root certificate object name in Azure Key Vault.", + SerializedName = @"rootCertObjectName", + PossibleTypes = new [] { typeof(string) })] + string RootCertObjectName { get; set; } + + } + /// Plugin certificates information for Service Mesh. + internal partial interface IIstioPluginCertificateAuthorityInternal + + { + /// Certificate chain object name in Azure Key Vault. + string CertChainObjectName { get; set; } + /// Intermediate certificate object name in Azure Key Vault. + string CertObjectName { get; set; } + /// Intermediate certificate private key object name in Azure Key Vault. + string KeyObjectName { get; set; } + /// The resource ID of the Key Vault. + string KeyVaultId { get; set; } + /// Root certificate object name in Azure Key Vault. + string RootCertObjectName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioPluginCertificateAuthority.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioPluginCertificateAuthority.json.cs new file mode 100644 index 000000000000..7c1e6e7327fa --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioPluginCertificateAuthority.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Plugin certificates information for Service Mesh. + public partial class IstioPluginCertificateAuthority + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new IstioPluginCertificateAuthority(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal IstioPluginCertificateAuthority(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_keyVaultId = If( json?.PropertyT("keyVaultId"), out var __jsonKeyVaultId) ? (string)__jsonKeyVaultId : (string)_keyVaultId;} + {_certObjectName = If( json?.PropertyT("certObjectName"), out var __jsonCertObjectName) ? (string)__jsonCertObjectName : (string)_certObjectName;} + {_keyObjectName = If( json?.PropertyT("keyObjectName"), out var __jsonKeyObjectName) ? (string)__jsonKeyObjectName : (string)_keyObjectName;} + {_rootCertObjectName = If( json?.PropertyT("rootCertObjectName"), out var __jsonRootCertObjectName) ? (string)__jsonRootCertObjectName : (string)_rootCertObjectName;} + {_certChainObjectName = If( json?.PropertyT("certChainObjectName"), out var __jsonCertChainObjectName) ? (string)__jsonCertChainObjectName : (string)_certChainObjectName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._keyVaultId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._keyVaultId.ToString()) : null, "keyVaultId" ,container.Add ); + AddIf( null != (((object)this._certObjectName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._certObjectName.ToString()) : null, "certObjectName" ,container.Add ); + AddIf( null != (((object)this._keyObjectName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._keyObjectName.ToString()) : null, "keyObjectName" ,container.Add ); + AddIf( null != (((object)this._rootCertObjectName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._rootCertObjectName.ToString()) : null, "rootCertObjectName" ,container.Add ); + AddIf( null != (((object)this._certChainObjectName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._certChainObjectName.ToString()) : null, "certChainObjectName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioServiceMesh.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioServiceMesh.PowerShell.cs new file mode 100644 index 000000000000..9364ff636908 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioServiceMesh.PowerShell.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Istio service mesh configuration. + [System.ComponentModel.TypeConverter(typeof(IstioServiceMeshTypeConverter))] + public partial class IstioServiceMesh + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new IstioServiceMesh(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new IstioServiceMesh(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal IstioServiceMesh(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Component")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).Component = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents) content.GetValueForProperty("Component",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).Component, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioComponentsTypeConverter.ConvertFrom); + } + if (content.Contains("CertificateAuthority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).CertificateAuthority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority) content.GetValueForProperty("CertificateAuthority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).CertificateAuthority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("Revision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).Revision = (System.Collections.Generic.List) content.GetValueForProperty("Revision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).Revision, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ComponentIngressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).ComponentIngressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentIngressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).ComponentIngressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioIngressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("ComponentEgressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).ComponentEgressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentEgressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).ComponentEgressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioEgressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("CertificateAuthorityPlugin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).CertificateAuthorityPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority) content.GetValueForProperty("CertificateAuthorityPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).CertificateAuthorityPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("PluginKeyVaultId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginKeyVaultId = (string) content.GetValueForProperty("PluginKeyVaultId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginKeyVaultId, global::System.Convert.ToString); + } + if (content.Contains("PluginCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginCertObjectName = (string) content.GetValueForProperty("PluginCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginKeyObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginKeyObjectName = (string) content.GetValueForProperty("PluginKeyObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginKeyObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginRootCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginRootCertObjectName = (string) content.GetValueForProperty("PluginRootCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginRootCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginCertChainObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginCertChainObjectName = (string) content.GetValueForProperty("PluginCertChainObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginCertChainObjectName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal IstioServiceMesh(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Component")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).Component = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents) content.GetValueForProperty("Component",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).Component, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioComponentsTypeConverter.ConvertFrom); + } + if (content.Contains("CertificateAuthority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).CertificateAuthority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority) content.GetValueForProperty("CertificateAuthority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).CertificateAuthority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("Revision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).Revision = (System.Collections.Generic.List) content.GetValueForProperty("Revision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).Revision, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ComponentIngressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).ComponentIngressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentIngressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).ComponentIngressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioIngressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("ComponentEgressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).ComponentEgressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentEgressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).ComponentEgressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioEgressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("CertificateAuthorityPlugin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).CertificateAuthorityPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority) content.GetValueForProperty("CertificateAuthorityPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).CertificateAuthorityPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("PluginKeyVaultId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginKeyVaultId = (string) content.GetValueForProperty("PluginKeyVaultId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginKeyVaultId, global::System.Convert.ToString); + } + if (content.Contains("PluginCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginCertObjectName = (string) content.GetValueForProperty("PluginCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginKeyObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginKeyObjectName = (string) content.GetValueForProperty("PluginKeyObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginKeyObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginRootCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginRootCertObjectName = (string) content.GetValueForProperty("PluginRootCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginRootCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginCertChainObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginCertChainObjectName = (string) content.GetValueForProperty("PluginCertChainObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)this).PluginCertChainObjectName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Istio service mesh configuration. + [System.ComponentModel.TypeConverter(typeof(IstioServiceMeshTypeConverter))] + public partial interface IIstioServiceMesh + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProperty.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioServiceMesh.TypeConverter.cs similarity index 89% rename from generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProperty.TypeConverter.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/IstioServiceMesh.TypeConverter.cs index fc9506ba9097..5b1dcecddf52 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProperty.TypeConverter.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioServiceMesh.TypeConverter.cs @@ -8,9 +8,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class OSOptionPropertyTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class IstioServiceMeshTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class OSOptionPropertyTypeConverter : global::System.Management.A public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// not used by this TypeConverter. /// when set to true, will ignore the case when converting. /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter into an instance of + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh).IsAssignableFrom(type)) { return sourceValue; } try { - return OSOptionProperty.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return IstioServiceMesh.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty Co } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return OSOptionProperty.DeserializeFromPSObject(sourceValue); + return IstioServiceMesh.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return OSOptionProperty.DeserializeFromDictionary(sourceValue); + return IstioServiceMesh.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/IstioServiceMesh.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioServiceMesh.cs new file mode 100644 index 000000000000..f6053456a3f1 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioServiceMesh.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Istio service mesh configuration. + public partial class IstioServiceMesh : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority _certificateAuthority; + + /// + /// Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described + /// here https://aka.ms/asm-plugin-ca + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority CertificateAuthority { get => (this._certificateAuthority = this._certificateAuthority ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioCertificateAuthority()); set => this._certificateAuthority = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents _component; + + /// Istio components configuration. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents Component { get => (this._component = this._component ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioComponents()); set => this._component = value; } + + /// Istio egress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ComponentEgressGateway { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponentsInternal)Component).EgressGateway; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponentsInternal)Component).EgressGateway = value ?? null /* arrayOf */; } + + /// Istio ingress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ComponentIngressGateway { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponentsInternal)Component).IngressGateway; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponentsInternal)Component).IngressGateway = value ?? null /* arrayOf */; } + + /// Internal Acessors for CertificateAuthority + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal.CertificateAuthority { get => (this._certificateAuthority = this._certificateAuthority ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioCertificateAuthority()); set { {_certificateAuthority = value;} } } + + /// Internal Acessors for CertificateAuthorityPlugin + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal.CertificateAuthorityPlugin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)CertificateAuthority).Plugin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)CertificateAuthority).Plugin = value ?? null /* model class */; } + + /// Internal Acessors for Component + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal.Component { get => (this._component = this._component ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioComponents()); set { {_component = value;} } } + + /// Certificate chain object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginCertChainObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)CertificateAuthority).PluginCertChainObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)CertificateAuthority).PluginCertChainObjectName = value ?? null; } + + /// Intermediate certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginCertObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)CertificateAuthority).PluginCertObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)CertificateAuthority).PluginCertObjectName = value ?? null; } + + /// Intermediate certificate private key object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginKeyObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)CertificateAuthority).PluginKeyObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)CertificateAuthority).PluginKeyObjectName = value ?? null; } + + /// The resource ID of the Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginKeyVaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)CertificateAuthority).PluginKeyVaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)CertificateAuthority).PluginKeyVaultId = value ?? null; } + + /// Root certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginRootCertObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)CertificateAuthority).PluginRootCertObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthorityInternal)CertificateAuthority).PluginRootCertObjectName = value ?? null; } + + /// Backing field for property. + private System.Collections.Generic.List _revision; + + /// + /// The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary + /// upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Revision { get => this._revision; set => this._revision = value; } + + /// Creates an new instance. + public IstioServiceMesh() + { + + } + } + /// Istio service mesh configuration. + public partial interface IIstioServiceMesh : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Istio egress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Istio egress gateways.", + SerializedName = @"egressGateways", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway) })] + System.Collections.Generic.List ComponentEgressGateway { get; set; } + /// Istio ingress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Istio ingress gateways.", + SerializedName = @"ingressGateways", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway) })] + System.Collections.Generic.List ComponentIngressGateway { get; set; } + /// Certificate chain object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Certificate chain object name in Azure Key Vault.", + SerializedName = @"certChainObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginCertChainObjectName { get; set; } + /// Intermediate certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Intermediate certificate object name in Azure Key Vault.", + SerializedName = @"certObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginCertObjectName { get; set; } + /// Intermediate certificate private key object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Intermediate certificate private key object name in Azure Key Vault.", + SerializedName = @"keyObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginKeyObjectName { get; set; } + /// The resource ID of the Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The resource ID of the Key Vault.", + SerializedName = @"keyVaultId", + PossibleTypes = new [] { typeof(string) })] + string PluginKeyVaultId { get; set; } + /// Root certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Root certificate object name in Azure Key Vault.", + SerializedName = @"rootCertObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginRootCertObjectName { get; set; } + /// + /// The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary + /// upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade", + SerializedName = @"revisions", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List Revision { get; set; } + + } + /// Istio service mesh configuration. + internal partial interface IIstioServiceMeshInternal + + { + /// + /// Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described + /// here https://aka.ms/asm-plugin-ca + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority CertificateAuthority { get; set; } + /// Plugin certificates information for Service Mesh. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority CertificateAuthorityPlugin { get; set; } + /// Istio components configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents Component { get; set; } + /// Istio egress gateways. + System.Collections.Generic.List ComponentEgressGateway { get; set; } + /// Istio ingress gateways. + System.Collections.Generic.List ComponentIngressGateway { get; set; } + /// Certificate chain object name in Azure Key Vault. + string PluginCertChainObjectName { get; set; } + /// Intermediate certificate object name in Azure Key Vault. + string PluginCertObjectName { get; set; } + /// Intermediate certificate private key object name in Azure Key Vault. + string PluginKeyObjectName { get; set; } + /// The resource ID of the Key Vault. + string PluginKeyVaultId { get; set; } + /// Root certificate object name in Azure Key Vault. + string PluginRootCertObjectName { get; set; } + /// + /// The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary + /// upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + /// + System.Collections.Generic.List Revision { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/CloudErrorBody.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/IstioServiceMesh.json.cs similarity index 66% rename from generated/Aks/Aks.Autorest/generated/api/Models/CloudErrorBody.json.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/IstioServiceMesh.json.cs index c3f67b471109..c426078d2873 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/CloudErrorBody.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/IstioServiceMesh.json.cs @@ -7,8 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// An error response from the Container service. - public partial class CloudErrorBody + /// Istio service mesh configuration. + public partial class IstioServiceMesh { /// @@ -54,10 +54,20 @@ public partial class CloudErrorBody partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new IstioServiceMesh(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. - internal CloudErrorBody(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + internal IstioServiceMesh(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -65,31 +75,20 @@ internal CloudErrorBody(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.Json { return; } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} - {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)_target;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CloudErrorBody.FromJson(__u) )) ))() : null : _detail;} + {_component = If( json?.PropertyT("components"), out var __jsonComponents) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioComponents.FromJson(__jsonComponents) : _component;} + {_certificateAuthority = If( json?.PropertyT("certificateAuthority"), out var __jsonCertificateAuthority) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioCertificateAuthority.FromJson(__jsonCertificateAuthority) : _certificateAuthority;} + {_revision = If( json?.PropertyT("revisions"), out var __jsonRevisions) ? If( __jsonRevisions as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _revision;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody. - /// - /// a to deserialize from. - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new CloudErrorBody(json) : null; - } - - /// - /// Serializes this instance of into a . + /// Serializes this instance of into a . /// /// The container to serialize this object into. If the caller /// passes in null, a new instance will be created and returned to the caller. /// Allows the caller to choose the depth of the serialization. See . /// - /// a serialized instance of as a . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) { @@ -101,17 +100,16 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } - AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); - AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); - AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); - if (null != this._detail) + AddIf( null != this._component ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._component.ToJson(null,serializationMode) : null, "components" ,container.Add ); + AddIf( null != this._certificateAuthority ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._certificateAuthority.ToJson(null,serializationMode) : null, "certificateAuthority" ,container.Add ); + if (null != this._revision) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); - foreach( var __x in this._detail ) + foreach( var __x in this._revision ) { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); } - container.Add("details",__w); + container.Add("revisions",__w); } AfterToJson(ref container); return container; diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubeletConfig.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubeletConfig.PowerShell.cs index 3aa53e00713a..d8e7fbad677a 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/KubeletConfig.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubeletConfig.PowerShell.cs @@ -8,7 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; /// - /// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. + /// Kubelet configurations of agent nodes. See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. /// [System.ComponentModel.TypeConverter(typeof(KubeletConfigTypeConverter))] public partial class KubeletConfig @@ -236,7 +237,8 @@ public override string ToString() return ToJsonString(); } } - /// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. + /// Kubelet configurations of agent nodes. See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. [System.ComponentModel.TypeConverter(typeof(KubeletConfigTypeConverter))] public partial interface IKubeletConfig diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubeletConfig.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubeletConfig.cs index b9ec7764d223..87da43dffbeb 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/KubeletConfig.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubeletConfig.cs @@ -8,7 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. + /// Kubelet configurations of agent nodes. See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. /// public partial class KubeletConfig : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfig, @@ -41,7 +42,9 @@ public partial class KubeletConfig : /// Backing field for property. private bool? _cpuCfsQuota; - /// The default is true. + /// + /// If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public bool? CpuCfsQuota { get => this._cpuCfsQuota; set => this._cpuCfsQuota = value; } @@ -49,8 +52,8 @@ public partial class KubeletConfig : private string _cpuCfsQuotaPeriod; /// - /// The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For - /// example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + /// The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an optional + /// fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string CpuCfsQuotaPeriod { get => this._cpuCfsQuotaPeriod; set => this._cpuCfsQuotaPeriod = value; } @@ -59,7 +62,7 @@ public partial class KubeletConfig : private string _cpuManagerPolicy; /// - /// The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + /// The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) /// for more information. Allowed values are 'none' and 'static'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] @@ -77,14 +80,20 @@ public partial class KubeletConfig : /// Backing field for property. private int? _imageGcHighThreshold; - /// To disable image garbage collection, set to 100. The default is 85% + /// + /// The percent of disk usage after which image garbage collection is always run. To disable image garbage collection, set + /// to 100. The default is 85% + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public int? ImageGcHighThreshold { get => this._imageGcHighThreshold; set => this._imageGcHighThreshold = value; } /// Backing field for property. private int? _imageGcLowThreshold; - /// This cannot be set higher than imageGcHighThreshold. The default is 80% + /// + /// The percent of disk usage before which image garbage collection is never run. This cannot be set higher than imageGcHighThreshold. + /// The default is 80% + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public int? ImageGcLowThreshold { get => this._imageGcLowThreshold; set => this._imageGcLowThreshold = value; } @@ -99,7 +108,7 @@ public partial class KubeletConfig : private string _topologyManagerPolicy; /// - /// For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). + /// The Topology Manager policy to use. For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). /// The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] @@ -111,7 +120,8 @@ public KubeletConfig() } } - /// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. + /// Kubelet configurations of agent nodes. See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. public partial interface IKubeletConfig : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { @@ -150,20 +160,22 @@ public partial interface IKubeletConfig : SerializedName = @"containerLogMaxSizeMB", PossibleTypes = new [] { typeof(int) })] int? ContainerLogMaxSizeMb { get; set; } - /// The default is true. + /// + /// If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is true.", + Description = @"If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true.", SerializedName = @"cpuCfsQuota", PossibleTypes = new [] { typeof(bool) })] bool? CpuCfsQuota { get; set; } /// - /// The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For - /// example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + /// The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an optional + /// fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -171,12 +183,12 @@ public partial interface IKubeletConfig : Read = true, Create = true, Update = true, - Description = @"The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'.", + Description = @"The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'.", SerializedName = @"cpuCfsQuotaPeriod", PossibleTypes = new [] { typeof(string) })] string CpuCfsQuotaPeriod { get; set; } /// - /// The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + /// The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) /// for more information. Allowed values are 'none' and 'static'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -185,7 +197,7 @@ public partial interface IKubeletConfig : Read = true, Create = true, Update = true, - Description = @"The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) for more information. Allowed values are 'none' and 'static'.", + Description = @"The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) for more information. Allowed values are 'none' and 'static'.", SerializedName = @"cpuManagerPolicy", PossibleTypes = new [] { typeof(string) })] string CpuManagerPolicy { get; set; } @@ -202,25 +214,31 @@ public partial interface IKubeletConfig : SerializedName = @"failSwapOn", PossibleTypes = new [] { typeof(bool) })] bool? FailSwapOn { get; set; } - /// To disable image garbage collection, set to 100. The default is 85% + /// + /// The percent of disk usage after which image garbage collection is always run. To disable image garbage collection, set + /// to 100. The default is 85% + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"To disable image garbage collection, set to 100. The default is 85%", + Description = @"The percent of disk usage after which image garbage collection is always run. To disable image garbage collection, set to 100. The default is 85%", SerializedName = @"imageGcHighThreshold", PossibleTypes = new [] { typeof(int) })] int? ImageGcHighThreshold { get; set; } - /// This cannot be set higher than imageGcHighThreshold. The default is 80% + /// + /// The percent of disk usage before which image garbage collection is never run. This cannot be set higher than imageGcHighThreshold. + /// The default is 80% + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"This cannot be set higher than imageGcHighThreshold. The default is 80%", + Description = @"The percent of disk usage before which image garbage collection is never run. This cannot be set higher than imageGcHighThreshold. The default is 80%", SerializedName = @"imageGcLowThreshold", PossibleTypes = new [] { typeof(int) })] int? ImageGcLowThreshold { get; set; } @@ -236,7 +254,7 @@ public partial interface IKubeletConfig : PossibleTypes = new [] { typeof(int) })] int? PodMaxPid { get; set; } /// - /// For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). + /// The Topology Manager policy to use. For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). /// The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -245,13 +263,14 @@ public partial interface IKubeletConfig : Read = true, Create = true, Update = true, - Description = @"For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'.", + Description = @"The Topology Manager policy to use. For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'.", SerializedName = @"topologyManagerPolicy", PossibleTypes = new [] { typeof(string) })] string TopologyManagerPolicy { get; set; } } - /// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. + /// Kubelet configurations of agent nodes. See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. internal partial interface IKubeletConfigInternal { @@ -263,15 +282,17 @@ internal partial interface IKubeletConfigInternal int? ContainerLogMaxFile { get; set; } /// The maximum size (e.g. 10Mi) of container log file before it is rotated. int? ContainerLogMaxSizeMb { get; set; } - /// The default is true. + /// + /// If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true. + /// bool? CpuCfsQuota { get; set; } /// - /// The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For - /// example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + /// The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an optional + /// fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. /// string CpuCfsQuotaPeriod { get; set; } /// - /// The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + /// The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) /// for more information. Allowed values are 'none' and 'static'. /// string CpuManagerPolicy { get; set; } @@ -279,14 +300,20 @@ internal partial interface IKubeletConfigInternal /// If set to true it will make the Kubelet fail to start if swap is enabled on the node. /// bool? FailSwapOn { get; set; } - /// To disable image garbage collection, set to 100. The default is 85% + /// + /// The percent of disk usage after which image garbage collection is always run. To disable image garbage collection, set + /// to 100. The default is 85% + /// int? ImageGcHighThreshold { get; set; } - /// This cannot be set higher than imageGcHighThreshold. The default is 80% + /// + /// The percent of disk usage before which image garbage collection is never run. This cannot be set higher than imageGcHighThreshold. + /// The default is 80% + /// int? ImageGcLowThreshold { get; set; } /// The maximum number of processes per pod. int? PodMaxPid { get; set; } /// - /// For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). + /// The Topology Manager policy to use. For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). /// The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. /// string TopologyManagerPolicy { get; set; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubeletConfig.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubeletConfig.json.cs index 86f1718d345d..e908e8df649d 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/KubeletConfig.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubeletConfig.json.cs @@ -8,7 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. + /// Kubelet configurations of agent nodes. See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. /// public partial class KubeletConfig { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesPatchVersion.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesPatchVersion.PowerShell.cs new file mode 100644 index 000000000000..dc33a6b28bc7 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesPatchVersion.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Kubernetes patch version profile + [System.ComponentModel.TypeConverter(typeof(KubernetesPatchVersionTypeConverter))] + public partial class KubernetesPatchVersion + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new KubernetesPatchVersion(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new KubernetesPatchVersion(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal KubernetesPatchVersion(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Upgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersionInternal)this).Upgrade = (System.Collections.Generic.List) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersionInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal KubernetesPatchVersion(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Upgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersionInternal)this).Upgrade = (System.Collections.Generic.List) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersionInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Kubernetes patch version profile + [System.ComponentModel.TypeConverter(typeof(KubernetesPatchVersionTypeConverter))] + public partial interface IKubernetesPatchVersion + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesPatchVersion.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesPatchVersion.TypeConverter.cs new file mode 100644 index 000000000000..bf433fe6e883 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesPatchVersion.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class KubernetesPatchVersionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersion ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersion).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return KubernetesPatchVersion.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return KubernetesPatchVersion.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return KubernetesPatchVersion.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesPatchVersion.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesPatchVersion.cs new file mode 100644 index 000000000000..52e50fe65b1d --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesPatchVersion.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Kubernetes patch version profile + public partial class KubernetesPatchVersion : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersion, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersionInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _upgrade; + + /// Possible upgrade path for given patch version + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Upgrade { get => this._upgrade; set => this._upgrade = value; } + + /// Creates an new instance. + public KubernetesPatchVersion() + { + + } + } + /// Kubernetes patch version profile + public partial interface IKubernetesPatchVersion : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Possible upgrade path for given patch version + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Possible upgrade path for given patch version", + SerializedName = @"upgrades", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List Upgrade { get; set; } + + } + /// Kubernetes patch version profile + internal partial interface IKubernetesPatchVersionInternal + + { + /// Possible upgrade path for given patch version + System.Collections.Generic.List Upgrade { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesPatchVersion.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesPatchVersion.json.cs new file mode 100644 index 000000000000..6c6278666c50 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesPatchVersion.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Kubernetes patch version profile + public partial class KubernetesPatchVersion + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersion. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new KubernetesPatchVersion(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal KubernetesPatchVersion(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_upgrade = If( json?.PropertyT("upgrades"), out var __jsonUpgrades) ? If( __jsonUpgrades as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _upgrade;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._upgrade) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._upgrade ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("upgrades",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersion.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersion.PowerShell.cs new file mode 100644 index 000000000000..d726ecd57846 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersion.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Kubernetes version profile for given major.minor release. + [System.ComponentModel.TypeConverter(typeof(KubernetesVersionTypeConverter))] + public partial class KubernetesVersion + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new KubernetesVersion(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new KubernetesVersion(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal KubernetesVersion(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Capability")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).Capability = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities) content.GetValueForProperty("Capability",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).Capability, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersionCapabilitiesTypeConverter.ConvertFrom); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("IsDefault")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).IsDefault = (bool?) content.GetValueForProperty("IsDefault",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).IsDefault, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PatchVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).PatchVersion = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions) content.GetValueForProperty("PatchVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).PatchVersion, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersionPatchVersionsTypeConverter.ConvertFrom); + } + if (content.Contains("CapabilitySupportPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).CapabilitySupportPlan = (System.Collections.Generic.List) content.GetValueForProperty("CapabilitySupportPlan",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).CapabilitySupportPlan, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal KubernetesVersion(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Capability")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).Capability = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities) content.GetValueForProperty("Capability",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).Capability, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersionCapabilitiesTypeConverter.ConvertFrom); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("IsDefault")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).IsDefault = (bool?) content.GetValueForProperty("IsDefault",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).IsDefault, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PatchVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).PatchVersion = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions) content.GetValueForProperty("PatchVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).PatchVersion, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersionPatchVersionsTypeConverter.ConvertFrom); + } + if (content.Contains("CapabilitySupportPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).CapabilitySupportPlan = (System.Collections.Generic.List) content.GetValueForProperty("CapabilitySupportPlan",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal)this).CapabilitySupportPlan, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Kubernetes version profile for given major.minor release. + [System.ComponentModel.TypeConverter(typeof(KubernetesVersionTypeConverter))] + public partial interface IKubernetesVersion + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersion.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersion.TypeConverter.cs new file mode 100644 index 000000000000..d4ed41f71ff3 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersion.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class KubernetesVersionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersion ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersion).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return KubernetesVersion.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return KubernetesVersion.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return KubernetesVersion.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersion.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersion.cs new file mode 100644 index 000000000000..feceaf6aaeab --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersion.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Kubernetes version profile for given major.minor release. + public partial class KubernetesVersion : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersion, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities _capability; + + /// Capabilities on this Kubernetes version. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities Capability { get => (this._capability = this._capability ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersionCapabilities()); set => this._capability = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List CapabilitySupportPlan { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilitiesInternal)Capability).SupportPlan; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilitiesInternal)Capability).SupportPlan = value ?? null /* arrayOf */; } + + /// Backing field for property. + private bool? _isDefault; + + /// Whether this version is default. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? IsDefault { get => this._isDefault; set => this._isDefault = value; } + + /// Backing field for property. + private bool? _isPreview; + + /// Whether this version is in preview mode. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? IsPreview { get => this._isPreview; set => this._isPreview = value; } + + /// Internal Acessors for Capability + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionInternal.Capability { get => (this._capability = this._capability ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersionCapabilities()); set { {_capability = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions _patchVersion; + + /// Patch versions of Kubernetes release + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions PatchVersion { get => (this._patchVersion = this._patchVersion ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersionPatchVersions()); set => this._patchVersion = value; } + + /// Backing field for property. + private string _version; + + /// major.minor version of Kubernetes release + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Version { get => this._version; set => this._version = value; } + + /// Creates an new instance. + public KubernetesVersion() + { + + } + } + /// Kubernetes version profile for given major.minor release. + public partial interface IKubernetesVersion : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"supportPlan", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("KubernetesOfficial", "AKSLongTermSupport")] + System.Collections.Generic.List CapabilitySupportPlan { get; set; } + /// Whether this version is default. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether this version is default.", + SerializedName = @"isDefault", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDefault { get; set; } + /// Whether this version is in preview mode. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether this version is in preview mode.", + SerializedName = @"isPreview", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPreview { get; set; } + /// Patch versions of Kubernetes release + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Patch versions of Kubernetes release", + SerializedName = @"patchVersions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions PatchVersion { get; set; } + /// major.minor version of Kubernetes release + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"major.minor version of Kubernetes release", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } + + } + /// Kubernetes version profile for given major.minor release. + internal partial interface IKubernetesVersionInternal + + { + /// Capabilities on this Kubernetes version. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities Capability { get; set; } + + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("KubernetesOfficial", "AKSLongTermSupport")] + System.Collections.Generic.List CapabilitySupportPlan { get; set; } + /// Whether this version is default. + bool? IsDefault { get; set; } + /// Whether this version is in preview mode. + bool? IsPreview { get; set; } + /// Patch versions of Kubernetes release + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions PatchVersion { get; set; } + /// major.minor version of Kubernetes release + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersion.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersion.json.cs new file mode 100644 index 000000000000..c470c9801ff3 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersion.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Kubernetes version profile for given major.minor release. + public partial class KubernetesVersion + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersion. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new KubernetesVersion(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal KubernetesVersion(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_capability = If( json?.PropertyT("capabilities"), out var __jsonCapabilities) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersionCapabilities.FromJson(__jsonCapabilities) : _capability;} + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)_version;} + {_isDefault = If( json?.PropertyT("isDefault"), out var __jsonIsDefault) ? (bool?)__jsonIsDefault : _isDefault;} + {_isPreview = If( json?.PropertyT("isPreview"), out var __jsonIsPreview) ? (bool?)__jsonIsPreview : _isPreview;} + {_patchVersion = If( json?.PropertyT("patchVersions"), out var __jsonPatchVersions) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersionPatchVersions.FromJson(__jsonPatchVersions) : _patchVersion;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._capability ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._capability.ToJson(null,serializationMode) : null, "capabilities" ,container.Add ); + AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); + AddIf( null != this._isDefault ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._isDefault) : null, "isDefault" ,container.Add ); + AddIf( null != this._isPreview ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._isPreview) : null, "isPreview" ,container.Add ); + AddIf( null != this._patchVersion ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._patchVersion.ToJson(null,serializationMode) : null, "patchVersions" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionCapabilities.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionCapabilities.PowerShell.cs new file mode 100644 index 000000000000..1a0754cd82fd --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionCapabilities.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Capabilities on this Kubernetes version. + [System.ComponentModel.TypeConverter(typeof(KubernetesVersionCapabilitiesTypeConverter))] + public partial class KubernetesVersionCapabilities + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new KubernetesVersionCapabilities(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new KubernetesVersionCapabilities(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal KubernetesVersionCapabilities(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SupportPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilitiesInternal)this).SupportPlan = (System.Collections.Generic.List) content.GetValueForProperty("SupportPlan",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilitiesInternal)this).SupportPlan, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal KubernetesVersionCapabilities(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SupportPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilitiesInternal)this).SupportPlan = (System.Collections.Generic.List) content.GetValueForProperty("SupportPlan",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilitiesInternal)this).SupportPlan, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Capabilities on this Kubernetes version. + [System.ComponentModel.TypeConverter(typeof(KubernetesVersionCapabilitiesTypeConverter))] + public partial interface IKubernetesVersionCapabilities + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionCapabilities.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionCapabilities.TypeConverter.cs new file mode 100644 index 000000000000..9967eb50d322 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionCapabilities.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class KubernetesVersionCapabilitiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return KubernetesVersionCapabilities.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return KubernetesVersionCapabilities.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return KubernetesVersionCapabilities.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionCapabilities.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionCapabilities.cs new file mode 100644 index 000000000000..ddf7768e2be0 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionCapabilities.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Capabilities on this Kubernetes version. + public partial class KubernetesVersionCapabilities : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilitiesInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _supportPlan; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List SupportPlan { get => this._supportPlan; set => this._supportPlan = value; } + + /// Creates an new instance. + public KubernetesVersionCapabilities() + { + + } + } + /// Capabilities on this Kubernetes version. + public partial interface IKubernetesVersionCapabilities : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"supportPlan", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("KubernetesOfficial", "AKSLongTermSupport")] + System.Collections.Generic.List SupportPlan { get; set; } + + } + /// Capabilities on this Kubernetes version. + internal partial interface IKubernetesVersionCapabilitiesInternal + + { + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("KubernetesOfficial", "AKSLongTermSupport")] + System.Collections.Generic.List SupportPlan { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionCapabilities.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionCapabilities.json.cs new file mode 100644 index 000000000000..13b702fbaa8b --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionCapabilities.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Capabilities on this Kubernetes version. + public partial class KubernetesVersionCapabilities + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionCapabilities FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new KubernetesVersionCapabilities(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal KubernetesVersionCapabilities(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_supportPlan = If( json?.PropertyT("supportPlan"), out var __jsonSupportPlan) ? If( __jsonSupportPlan as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _supportPlan;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._supportPlan) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._supportPlan ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("supportPlan",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionListResult.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionListResult.PowerShell.cs new file mode 100644 index 000000000000..d7c594cee0e1 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionListResult.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Hold values properties, which is array of KubernetesVersion + [System.ComponentModel.TypeConverter(typeof(KubernetesVersionListResultTypeConverter))] + public partial class KubernetesVersionListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new KubernetesVersionListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new KubernetesVersionListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal KubernetesVersionListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersionTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal KubernetesVersionListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersionTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Hold values properties, which is array of KubernetesVersion + [System.ComponentModel.TypeConverter(typeof(KubernetesVersionListResultTypeConverter))] + public partial interface IKubernetesVersionListResult + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionListResult.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionListResult.TypeConverter.cs new file mode 100644 index 000000000000..877058fc3945 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class KubernetesVersionListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return KubernetesVersionListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return KubernetesVersionListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return KubernetesVersionListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionListResult.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionListResult.cs new file mode 100644 index 000000000000..089bead7a92a --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionListResult.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Hold values properties, which is array of KubernetesVersion + public partial class KubernetesVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResultInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// Array of AKS supported Kubernetes versions. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public KubernetesVersionListResult() + { + + } + } + /// Hold values properties, which is array of KubernetesVersion + public partial interface IKubernetesVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Array of AKS supported Kubernetes versions. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Array of AKS supported Kubernetes versions.", + SerializedName = @"values", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersion) })] + System.Collections.Generic.List Value { get; set; } + + } + /// Hold values properties, which is array of KubernetesVersion + internal partial interface IKubernetesVersionListResultInternal + + { + /// Array of AKS supported Kubernetes versions. + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionPropertyList.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionListResult.json.cs similarity index 76% rename from generated/Aks/Aks.Autorest/generated/api/Models/OSOptionPropertyList.json.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionListResult.json.cs index f5e368ba509e..b424c61ce96a 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionPropertyList.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionListResult.json.cs @@ -7,8 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// The list of OS option properties. - public partial class OSOptionPropertyList + /// Hold values properties, which is array of KubernetesVersion + public partial class KubernetesVersionListResult { /// @@ -54,22 +54,22 @@ public partial class OSOptionPropertyList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new OSOptionPropertyList(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new KubernetesVersionListResult(json) : null; } /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. - internal OSOptionPropertyList(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + internal KubernetesVersionListResult(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -77,18 +77,18 @@ internal OSOptionPropertyList(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Jso { return; } - {_oSOptionPropertyList1 = If( json?.PropertyT("osOptionPropertyList"), out var __jsonOSOptionPropertyList) ? If( __jsonOSOptionPropertyList as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionProperty.FromJson(__u) )) ))() : null : _oSOptionPropertyList1;} + {_value = If( json?.PropertyT("values"), out var __jsonValues) ? If( __jsonValues as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersion) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersion.FromJson(__u) )) ))() : null : _value;} AfterFromJson(json); } /// - /// Serializes this instance of into a . + /// Serializes this instance of into a . /// /// The container to serialize this object into. If the caller /// passes in null, a new instance will be created and returned to the caller. /// Allows the caller to choose the depth of the serialization. See . /// - /// a serialized instance of as a . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) { @@ -100,14 +100,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } - if (null != this._oSOptionPropertyList1) + if (null != this._value) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); - foreach( var __x in this._oSOptionPropertyList1 ) + foreach( var __x in this._value ) { AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); } - container.Add("osOptionPropertyList",__w); + container.Add("values",__w); } AfterToJson(ref container); return container; diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.PowerShell.cs new file mode 100644 index 000000000000..81334caa0523 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.PowerShell.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Patch versions of Kubernetes release + [System.ComponentModel.TypeConverter(typeof(KubernetesVersionPatchVersionsTypeConverter))] + public partial class KubernetesVersionPatchVersions + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new KubernetesVersionPatchVersions(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new KubernetesVersionPatchVersions(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal KubernetesVersionPatchVersions(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal KubernetesVersionPatchVersions(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Patch versions of Kubernetes release + [System.ComponentModel.TypeConverter(typeof(KubernetesVersionPatchVersionsTypeConverter))] + public partial interface IKubernetesVersionPatchVersions + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.TypeConverter.cs new file mode 100644 index 000000000000..962aa5e95087 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class KubernetesVersionPatchVersionsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return KubernetesVersionPatchVersions.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return KubernetesVersionPatchVersions.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return KubernetesVersionPatchVersions.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.cs new file mode 100644 index 000000000000..15edd5ef2a71 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Patch versions of Kubernetes release + public partial class KubernetesVersionPatchVersions : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersionsInternal + { + + /// Creates an new instance. + public KubernetesVersionPatchVersions() + { + + } + } + /// Patch versions of Kubernetes release + public partial interface IKubernetesVersionPatchVersions : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray + { + + } + /// Patch versions of Kubernetes release + internal partial interface IKubernetesVersionPatchVersionsInternal + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.dictionary.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.dictionary.cs new file mode 100644 index 000000000000..257507cd626f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + public partial class KubernetesVersionPatchVersions : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersion this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersion value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesPatchVersion value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesVersionPatchVersions source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.json.cs new file mode 100644 index 000000000000..28045005d49a --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/KubernetesVersionPatchVersions.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Patch versions of Kubernetes release + public partial class KubernetesVersionPatchVersions + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionPatchVersions FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new KubernetesVersionPatchVersions(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + /// + internal KubernetesVersionPatchVersions(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubernetesPatchVersion.FromJson(j) ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/LinuxOSConfig.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/LinuxOSConfig.PowerShell.cs index 401dc5cc95bf..90b868573349 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/LinuxOSConfig.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/LinuxOSConfig.PowerShell.cs @@ -8,7 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; /// - /// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. + /// OS configurations of Linux agent nodes. See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. /// [System.ComponentModel.TypeConverter(typeof(LinuxOSConfigTypeConverter))] public partial class LinuxOSConfig @@ -180,7 +181,8 @@ public override string ToString() return ToJsonString(); } } - /// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. + /// OS configurations of Linux agent nodes. See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. [System.ComponentModel.TypeConverter(typeof(LinuxOSConfigTypeConverter))] public partial interface ILinuxOSConfig diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/LinuxOSConfig.cs b/generated/Aks/Aks.Autorest/generated/api/Models/LinuxOSConfig.cs index 2681e6f6c711..eb4559ffb980 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/LinuxOSConfig.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/LinuxOSConfig.cs @@ -8,7 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. + /// OS configurations of Linux agent nodes. See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. /// public partial class LinuxOSConfig : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ILinuxOSConfig, @@ -33,8 +34,9 @@ public partial class LinuxOSConfig : private string _transparentHugePageDefrag; /// - /// Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information - /// see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values are + /// 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent + /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string TransparentHugePageDefrag { get => this._transparentHugePageDefrag; set => this._transparentHugePageDefrag = value; } @@ -43,7 +45,8 @@ public partial class LinuxOSConfig : private string _transparentHugePageEnabled; /// - /// Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is 'always'. + /// For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string TransparentHugePageEnabled { get => this._transparentHugePageEnabled; set => this._transparentHugePageEnabled = value; } @@ -54,7 +57,8 @@ public LinuxOSConfig() } } - /// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. + /// OS configurations of Linux agent nodes. See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. public partial interface ILinuxOSConfig : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { @@ -81,8 +85,9 @@ public partial interface ILinuxOSConfig : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISysctlConfig) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISysctlConfig Sysctl { get; set; } /// - /// Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information - /// see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values are + /// 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent + /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -90,12 +95,13 @@ public partial interface ILinuxOSConfig : Read = true, Create = true, Update = true, - Description = @"Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).", + Description = @"Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).", SerializedName = @"transparentHugePageDefrag", PossibleTypes = new [] { typeof(string) })] string TransparentHugePageDefrag { get; set; } /// - /// Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is 'always'. + /// For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -103,13 +109,14 @@ public partial interface ILinuxOSConfig : Read = true, Create = true, Update = true, - Description = @"Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).", + Description = @"Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).", SerializedName = @"transparentHugePageEnabled", PossibleTypes = new [] { typeof(string) })] string TransparentHugePageEnabled { get; set; } } - /// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. + /// OS configurations of Linux agent nodes. See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. internal partial interface ILinuxOSConfigInternal { @@ -118,12 +125,14 @@ internal partial interface ILinuxOSConfigInternal /// Sysctl settings for Linux agent nodes. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISysctlConfig Sysctl { get; set; } /// - /// Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information - /// see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values are + /// 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent + /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// string TransparentHugePageDefrag { get; set; } /// - /// Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is 'always'. + /// For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// string TransparentHugePageEnabled { get; set; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/LinuxOSConfig.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/LinuxOSConfig.json.cs index 5b5fb4346791..e2e317bec4b1 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/LinuxOSConfig.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/LinuxOSConfig.json.cs @@ -8,7 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. + /// OS configurations of Linux agent nodes. See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. /// public partial class LinuxOSConfig { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/Machine.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/Machine.PowerShell.cs new file mode 100644 index 000000000000..6c09a2a11351 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/Machine.PowerShell.cs @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl get + /// nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. + /// + [System.ComponentModel.TypeConverter(typeof(MachineTypeConverter))] + public partial class Machine + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Machine(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Machine(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Machine(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachinePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).Zone = (System.Collections.Generic.List) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).Zone, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Network")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).Network = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties) content.GetValueForProperty("Network",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).Network, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineNetworkPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("NetworkIPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).NetworkIPAddress = (System.Collections.Generic.List) content.GetValueForProperty("NetworkIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).NetworkIPAddress, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineIPAddressTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Machine(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachinePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).Zone = (System.Collections.Generic.List) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).Zone, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Network")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).Network = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties) content.GetValueForProperty("Network",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).Network, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineNetworkPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("NetworkIPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).NetworkIPAddress = (System.Collections.Generic.List) content.GetValueForProperty("NetworkIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal)this).NetworkIPAddress, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineIPAddressTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl get + /// nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. + [System.ComponentModel.TypeConverter(typeof(MachineTypeConverter))] + public partial interface IMachine + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/Machine.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/Machine.TypeConverter.cs new file mode 100644 index 000000000000..8a81065eeb3f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/Machine.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MachineTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Machine.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Machine.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Machine.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/Machine.cs b/generated/Aks/Aks.Autorest/generated/api/Models/Machine.cs new file mode 100644 index 000000000000..85cc793883d6 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/Machine.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl get + /// nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. + /// + public partial class Machine : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SubResource(); + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Id; } + + /// Internal Acessors for Network + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal.Network { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)Property).Network; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)Property).Network = value ?? null /* model class */; } + + /// Internal Acessors for NetworkIPAddress + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal.NetworkIPAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)Property).NetworkIPAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)Property).NetworkIPAddress = value ?? null /* arrayOf */; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineProperties()); set { {_property = value;} } } + + /// Internal Acessors for ResourceId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal.ResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)Property).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)Property).ResourceId = value ?? null; } + + /// Internal Acessors for Zone + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineInternal.Zone { get => this._zone; set { {_zone = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Name = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Type = value ?? null; } + + /// + /// The name of the resource that is unique within a resource group. This name can be used to access the resource. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Name; } + + /// IPv4, IPv6 addresses of the machine + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List NetworkIPAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)Property).NetworkIPAddress; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties _property; + + /// The properties of the machine + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineProperties()); } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Azure resource id of the machine. It can be used to GET underlying VM Instance + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)Property).ResourceId; } + + /// Resource type + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Type; } + + /// Backing field for property. + private System.Collections.Generic.List _zone; + + /// The Availability zone in which machine is located. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Zone { get => this._zone; } + + /// Creates an new instance. + public Machine() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__subResource), __subResource); + await eventListener.AssertObjectIsValid(nameof(__subResource), __subResource); + } + } + /// A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl get + /// nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. + public partial interface IMachine : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResource + { + /// IPv4, IPv6 addresses of the machine + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"IPv4, IPv6 addresses of the machine", + SerializedName = @"ipAddresses", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddress) })] + System.Collections.Generic.List NetworkIPAddress { get; } + /// Azure resource id of the machine. It can be used to GET underlying VM Instance + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource id of the machine. It can be used to GET underlying VM Instance", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + string ResourceId { get; } + /// The Availability zone in which machine is located. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Availability zone in which machine is located.", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List Zone { get; } + + } + /// A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl get + /// nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. + internal partial interface IMachineInternal : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal + { + /// network properties of the machine + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties Network { get; set; } + /// IPv4, IPv6 addresses of the machine + System.Collections.Generic.List NetworkIPAddress { get; set; } + /// The properties of the machine + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties Property { get; set; } + /// Azure resource id of the machine. It can be used to GET underlying VM Instance + string ResourceId { get; set; } + /// The Availability zone in which machine is located. + System.Collections.Generic.List Zone { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/Machine.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/Machine.json.cs new file mode 100644 index 000000000000..bf5a0f8b234d --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/Machine.json.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl get + /// nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. + /// + public partial class Machine + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new Machine(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal Machine(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __subResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SubResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineProperties.FromJson(__jsonProperties) : _property;} + {_zone = If( json?.PropertyT("zones"), out var __jsonZones) ? If( __jsonZones as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _zone;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __subResource?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._zone) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._zone ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("zones",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProperty.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineIPAddress.PowerShell.cs similarity index 75% rename from generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProperty.PowerShell.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/MachineIPAddress.PowerShell.cs index 4f46a7202e62..02faec851485 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProperty.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineIPAddress.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// OS option property. - [System.ComponentModel.TypeConverter(typeof(OSOptionPropertyTypeConverter))] - public partial class OSOptionProperty + /// The machine IP address details. + [System.ComponentModel.TypeConverter(typeof(MachineIPAddressTypeConverter))] + public partial class MachineIPAddress { /// @@ -63,44 +63,44 @@ public partial class OSOptionProperty partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddress DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new OSOptionProperty(content); + return new MachineIPAddress(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddress DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new OSOptionProperty(content); + return new MachineIPAddress(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddress FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal OSOptionProperty(global::System.Collections.IDictionary content) + internal MachineIPAddress(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -109,23 +109,23 @@ internal OSOptionProperty(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("OSType")) + if (content.Contains("Family")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyInternal)this).OSType = (string) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyInternal)this).OSType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddressInternal)this).Family = (string) content.GetValueForProperty("Family",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddressInternal)this).Family, global::System.Convert.ToString); } - if (content.Contains("EnableFipsImage")) + if (content.Contains("IP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyInternal)this).EnableFipsImage = (bool) content.GetValueForProperty("EnableFipsImage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyInternal)this).EnableFipsImage, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddressInternal)this).IP = (string) content.GetValueForProperty("IP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddressInternal)this).IP, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal OSOptionProperty(global::System.Management.Automation.PSObject content) + internal MachineIPAddress(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -134,13 +134,13 @@ internal OSOptionProperty(global::System.Management.Automation.PSObject content) return; } // actually deserialize - if (content.Contains("OSType")) + if (content.Contains("Family")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyInternal)this).OSType = (string) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyInternal)this).OSType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddressInternal)this).Family = (string) content.GetValueForProperty("Family",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddressInternal)this).Family, global::System.Convert.ToString); } - if (content.Contains("EnableFipsImage")) + if (content.Contains("IP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyInternal)this).EnableFipsImage = (bool) content.GetValueForProperty("EnableFipsImage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyInternal)this).EnableFipsImage, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddressInternal)this).IP = (string) content.GetValueForProperty("IP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddressInternal)this).IP, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -162,9 +162,9 @@ public override string ToString() return ToJsonString(); } } - /// OS option property. - [System.ComponentModel.TypeConverter(typeof(OSOptionPropertyTypeConverter))] - public partial interface IOSOptionProperty + /// The machine IP address details. + [System.ComponentModel.TypeConverter(typeof(MachineIPAddressTypeConverter))] + public partial interface IMachineIPAddress { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineIPAddress.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineIPAddress.TypeConverter.cs new file mode 100644 index 000000000000..1b97e700a414 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineIPAddress.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MachineIPAddressTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddress ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddress).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MachineIPAddress.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MachineIPAddress.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MachineIPAddress.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineIPAddress.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineIPAddress.cs new file mode 100644 index 000000000000..6e88dfa53d22 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineIPAddress.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The machine IP address details. + public partial class MachineIPAddress : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddress, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddressInternal + { + + /// Backing field for property. + private string _family; + + /// To determine if address belongs IPv4 or IPv6 family + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Family { get => this._family; } + + /// Backing field for property. + private string _iP; + + /// IPv4 or IPv6 address of the machine + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string IP { get => this._iP; } + + /// Internal Acessors for Family + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddressInternal.Family { get => this._family; set { {_family = value;} } } + + /// Internal Acessors for IP + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddressInternal.IP { get => this._iP; set { {_iP = value;} } } + + /// Creates an new instance. + public MachineIPAddress() + { + + } + } + /// The machine IP address details. + public partial interface IMachineIPAddress : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// To determine if address belongs IPv4 or IPv6 family + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"To determine if address belongs IPv4 or IPv6 family", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("IPv4", "IPv6")] + string Family { get; } + /// IPv4 or IPv6 address of the machine + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"IPv4 or IPv6 address of the machine", + SerializedName = @"ip", + PossibleTypes = new [] { typeof(string) })] + string IP { get; } + + } + /// The machine IP address details. + internal partial interface IMachineIPAddressInternal + + { + /// To determine if address belongs IPv4 or IPv6 family + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("IPv4", "IPv6")] + string Family { get; set; } + /// IPv4 or IPv6 address of the machine + string IP { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineIPAddress.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineIPAddress.json.cs new file mode 100644 index 000000000000..392429384fa2 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineIPAddress.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The machine IP address details. + public partial class MachineIPAddress + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddress. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddress. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddress FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MachineIPAddress(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal MachineIPAddress(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_family = If( json?.PropertyT("family"), out var __jsonFamily) ? (string)__jsonFamily : (string)_family;} + {_iP = If( json?.PropertyT("ip"), out var __jsonIP) ? (string)__jsonIP : (string)_iP;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._family)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._family.ToString()) : null, "family" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._iP)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._iP.ToString()) : null, "ip" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineListResult.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineListResult.PowerShell.cs new file mode 100644 index 000000000000..36a916cfd38f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The response from the List Machines operation. + [System.ComponentModel.TypeConverter(typeof(MachineListResultTypeConverter))] + public partial class MachineListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MachineListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MachineListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MachineListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResultInternal)this).NextLink, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MachineListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResultInternal)this).NextLink, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response from the List Machines operation. + [System.ComponentModel.TypeConverter(typeof(MachineListResultTypeConverter))] + public partial interface IMachineListResult + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineListResult.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineListResult.TypeConverter.cs new file mode 100644 index 000000000000..3414716c46e7 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MachineListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MachineListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MachineListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MachineListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineListResult.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineListResult.cs new file mode 100644 index 000000000000..24cbc7e67fd1 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineListResult.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The response from the List Machines operation. + public partial class MachineListResult : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResult, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The URL to get the next set of machine results. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The list of Machines in cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public MachineListResult() + { + + } + } + /// The response from the List Machines operation. + public partial interface IMachineListResult : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The URL to get the next set of machine results. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL to get the next set of machine results.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// The list of Machines in cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The list of Machines in cluster.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response from the List Machines operation. + internal partial interface IMachineListResultInternal + + { + /// The URL to get the next set of machine results. + string NextLink { get; set; } + /// The list of Machines in cluster. + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineListResult.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineListResult.json.cs new file mode 100644 index 000000000000..bffc970f6292 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineListResult.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The response from the List Machines operation. + public partial class MachineListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MachineListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal MachineListResult(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Machine.FromJson(__u) )) ))() : null : _value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineNetworkProperties.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineNetworkProperties.PowerShell.cs new file mode 100644 index 000000000000..cffd4617f3fc --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineNetworkProperties.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// network properties of the machine + [System.ComponentModel.TypeConverter(typeof(MachineNetworkPropertiesTypeConverter))] + public partial class MachineNetworkProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MachineNetworkProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MachineNetworkProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MachineNetworkProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkPropertiesInternal)this).IPAddress = (System.Collections.Generic.List) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkPropertiesInternal)this).IPAddress, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineIPAddressTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MachineNetworkProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkPropertiesInternal)this).IPAddress = (System.Collections.Generic.List) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkPropertiesInternal)this).IPAddress, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineIPAddressTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// network properties of the machine + [System.ComponentModel.TypeConverter(typeof(MachineNetworkPropertiesTypeConverter))] + public partial interface IMachineNetworkProperties + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineNetworkProperties.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineNetworkProperties.TypeConverter.cs new file mode 100644 index 000000000000..6db2ef8c56f1 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineNetworkProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MachineNetworkPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MachineNetworkProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MachineNetworkProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MachineNetworkProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineNetworkProperties.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineNetworkProperties.cs new file mode 100644 index 000000000000..4f5f1b61a005 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineNetworkProperties.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// network properties of the machine + public partial class MachineNetworkProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkPropertiesInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _iPAddress; + + /// IPv4, IPv6 addresses of the machine + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List IPAddress { get => this._iPAddress; } + + /// Internal Acessors for IPAddress + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkPropertiesInternal.IPAddress { get => this._iPAddress; set { {_iPAddress = value;} } } + + /// Creates an new instance. + public MachineNetworkProperties() + { + + } + } + /// network properties of the machine + public partial interface IMachineNetworkProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// IPv4, IPv6 addresses of the machine + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"IPv4, IPv6 addresses of the machine", + SerializedName = @"ipAddresses", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddress) })] + System.Collections.Generic.List IPAddress { get; } + + } + /// network properties of the machine + internal partial interface IMachineNetworkPropertiesInternal + + { + /// IPv4, IPv6 addresses of the machine + System.Collections.Generic.List IPAddress { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineNetworkProperties.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineNetworkProperties.json.cs new file mode 100644 index 000000000000..2f49c8d31261 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineNetworkProperties.json.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// network properties of the machine + public partial class MachineNetworkProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MachineNetworkProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal MachineNetworkProperties(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_iPAddress = If( json?.PropertyT("ipAddresses"), out var __jsonIPAddresses) ? If( __jsonIPAddresses as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddress) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineIPAddress.FromJson(__u) )) ))() : null : _iPAddress;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._iPAddress) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._iPAddress ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("ipAddresses",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineProperties.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineProperties.PowerShell.cs new file mode 100644 index 000000000000..bc98b37f4378 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineProperties.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The properties of the machine + [System.ComponentModel.TypeConverter(typeof(MachinePropertiesTypeConverter))] + public partial class MachineProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MachineProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MachineProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MachineProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Network")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)this).Network = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties) content.GetValueForProperty("Network",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)this).Network, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineNetworkPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("NetworkIPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)this).NetworkIPAddress = (System.Collections.Generic.List) content.GetValueForProperty("NetworkIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)this).NetworkIPAddress, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineIPAddressTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MachineProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Network")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)this).Network = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties) content.GetValueForProperty("Network",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)this).Network, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineNetworkPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("NetworkIPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)this).NetworkIPAddress = (System.Collections.Generic.List) content.GetValueForProperty("NetworkIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal)this).NetworkIPAddress, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineIPAddressTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The properties of the machine + [System.ComponentModel.TypeConverter(typeof(MachinePropertiesTypeConverter))] + public partial interface IMachineProperties + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineProperties.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineProperties.TypeConverter.cs new file mode 100644 index 000000000000..534c594c8901 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MachinePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MachineProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MachineProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MachineProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineProperties.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineProperties.cs new file mode 100644 index 000000000000..2aa6acec687d --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineProperties.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The properties of the machine + public partial class MachineProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal + { + + /// Internal Acessors for Network + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal.Network { get => (this._network = this._network ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineNetworkProperties()); set { {_network = value;} } } + + /// Internal Acessors for NetworkIPAddress + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal.NetworkIPAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkPropertiesInternal)Network).IPAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkPropertiesInternal)Network).IPAddress = value ?? null /* arrayOf */; } + + /// Internal Acessors for ResourceId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachinePropertiesInternal.ResourceId { get => this._resourceId; set { {_resourceId = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties _network; + + /// network properties of the machine + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties Network { get => (this._network = this._network ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineNetworkProperties()); } + + /// IPv4, IPv6 addresses of the machine + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List NetworkIPAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkPropertiesInternal)Network).IPAddress; } + + /// Backing field for property. + private string _resourceId; + + /// Azure resource id of the machine. It can be used to GET underlying VM Instance + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ResourceId { get => this._resourceId; } + + /// Creates an new instance. + public MachineProperties() + { + + } + } + /// The properties of the machine + public partial interface IMachineProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// IPv4, IPv6 addresses of the machine + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"IPv4, IPv6 addresses of the machine", + SerializedName = @"ipAddresses", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineIPAddress) })] + System.Collections.Generic.List NetworkIPAddress { get; } + /// Azure resource id of the machine. It can be used to GET underlying VM Instance + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource id of the machine. It can be used to GET underlying VM Instance", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + string ResourceId { get; } + + } + /// The properties of the machine + internal partial interface IMachinePropertiesInternal + + { + /// network properties of the machine + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineNetworkProperties Network { get; set; } + /// IPv4, IPv6 addresses of the machine + System.Collections.Generic.List NetworkIPAddress { get; set; } + /// Azure resource id of the machine. It can be used to GET underlying VM Instance + string ResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MachineProperties.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MachineProperties.json.cs new file mode 100644 index 000000000000..f2f7f8eac1f6 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MachineProperties.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The properties of the machine + public partial class MachineProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MachineProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal MachineProperties(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_network = If( json?.PropertyT("network"), out var __jsonNetwork) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MachineNetworkProperties.FromJson(__jsonNetwork) : _network;} + {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)_resourceId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._network ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._network.ToJson(null,serializationMode) : null, "network" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._resourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._resourceId.ToString()) : null, "resourceId" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfiguration.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfiguration.PowerShell.cs index 389d1e5aeaa1..c7ceadd3f2c1 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfiguration.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfiguration.PowerShell.cs @@ -8,8 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; /// - /// See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned - /// maintenance. + /// Planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) + /// for more information about planned maintenance. /// [System.ComponentModel.TypeConverter(typeof(MaintenanceConfigurationTypeConverter))] public partial class MaintenanceConfiguration @@ -140,6 +140,10 @@ internal MaintenanceConfiguration(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceWindowTypeConverter.ConvertFrom); + } if (content.Contains("SystemDataCreatedByType")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); @@ -164,6 +168,78 @@ internal MaintenanceConfiguration(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).NotAllowedTime = (System.Collections.Generic.List) content.GetValueForProperty("NotAllowedTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).NotAllowedTime, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TimeSpanTypeConverter.ConvertFrom)); } + if (content.Contains("MaintenanceWindowSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule) content.GetValueForProperty("MaintenanceWindowSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowSchedule, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("MaintenanceWindowDurationHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowDurationHour = (int?) content.GetValueForProperty("MaintenanceWindowDurationHour",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowDurationHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowUtcOffset")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowUtcOffset = (string) content.GetValueForProperty("MaintenanceWindowUtcOffset",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowUtcOffset, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowStartDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowStartDate = (global::System.DateTime?) content.GetValueForProperty("MaintenanceWindowStartDate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowStartDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("MaintenanceWindowStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowStartTime = (string) content.GetValueForProperty("MaintenanceWindowStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowStartTime, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowNotAllowedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowNotAllowedDate = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowNotAllowedDate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowNotAllowedDate, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DateSpanTypeConverter.ConvertFrom)); + } + if (content.Contains("ScheduleDaily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleDaily = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule) content.GetValueForProperty("ScheduleDaily",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleDaily, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DailyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleWeekly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleWeekly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule) content.GetValueForProperty("ScheduleWeekly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleWeekly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.WeeklyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleAbsoluteMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleAbsoluteMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule) content.GetValueForProperty("ScheduleAbsoluteMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleAbsoluteMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AbsoluteMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleRelativeMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleRelativeMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule) content.GetValueForProperty("ScheduleRelativeMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleRelativeMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RelativeMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("DailyIntervalDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).DailyIntervalDay = (int?) content.GetValueForProperty("DailyIntervalDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).DailyIntervalDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyIntervalWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).WeeklyIntervalWeek = (int?) content.GetValueForProperty("WeeklyIntervalWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).WeeklyIntervalWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).WeeklyDayOfWeek = (string) content.GetValueForProperty("WeeklyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).WeeklyDayOfWeek, global::System.Convert.ToString); + } + if (content.Contains("AbsoluteMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).AbsoluteMonthlyIntervalMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).AbsoluteMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AbsoluteMonthlyDayOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).AbsoluteMonthlyDayOfMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyDayOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).AbsoluteMonthlyDayOfMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).RelativeMonthlyIntervalMonth = (int?) content.GetValueForProperty("RelativeMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).RelativeMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyWeekIndex")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).RelativeMonthlyWeekIndex = (string) content.GetValueForProperty("RelativeMonthlyWeekIndex",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).RelativeMonthlyWeekIndex, global::System.Convert.ToString); + } + if (content.Contains("RelativeMonthlyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).RelativeMonthlyDayOfWeek = (string) content.GetValueForProperty("RelativeMonthlyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).RelativeMonthlyDayOfWeek, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -209,6 +285,10 @@ internal MaintenanceConfiguration(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceWindowTypeConverter.ConvertFrom); + } if (content.Contains("SystemDataCreatedByType")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); @@ -233,6 +313,78 @@ internal MaintenanceConfiguration(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).NotAllowedTime = (System.Collections.Generic.List) content.GetValueForProperty("NotAllowedTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).NotAllowedTime, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TimeSpanTypeConverter.ConvertFrom)); } + if (content.Contains("MaintenanceWindowSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule) content.GetValueForProperty("MaintenanceWindowSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowSchedule, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("MaintenanceWindowDurationHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowDurationHour = (int?) content.GetValueForProperty("MaintenanceWindowDurationHour",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowDurationHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowUtcOffset")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowUtcOffset = (string) content.GetValueForProperty("MaintenanceWindowUtcOffset",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowUtcOffset, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowStartDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowStartDate = (global::System.DateTime?) content.GetValueForProperty("MaintenanceWindowStartDate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowStartDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("MaintenanceWindowStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowStartTime = (string) content.GetValueForProperty("MaintenanceWindowStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowStartTime, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowNotAllowedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowNotAllowedDate = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowNotAllowedDate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).MaintenanceWindowNotAllowedDate, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DateSpanTypeConverter.ConvertFrom)); + } + if (content.Contains("ScheduleDaily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleDaily = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule) content.GetValueForProperty("ScheduleDaily",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleDaily, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DailyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleWeekly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleWeekly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule) content.GetValueForProperty("ScheduleWeekly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleWeekly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.WeeklyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleAbsoluteMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleAbsoluteMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule) content.GetValueForProperty("ScheduleAbsoluteMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleAbsoluteMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AbsoluteMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleRelativeMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleRelativeMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule) content.GetValueForProperty("ScheduleRelativeMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).ScheduleRelativeMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RelativeMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("DailyIntervalDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).DailyIntervalDay = (int?) content.GetValueForProperty("DailyIntervalDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).DailyIntervalDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyIntervalWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).WeeklyIntervalWeek = (int?) content.GetValueForProperty("WeeklyIntervalWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).WeeklyIntervalWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).WeeklyDayOfWeek = (string) content.GetValueForProperty("WeeklyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).WeeklyDayOfWeek, global::System.Convert.ToString); + } + if (content.Contains("AbsoluteMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).AbsoluteMonthlyIntervalMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).AbsoluteMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AbsoluteMonthlyDayOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).AbsoluteMonthlyDayOfMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyDayOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).AbsoluteMonthlyDayOfMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).RelativeMonthlyIntervalMonth = (int?) content.GetValueForProperty("RelativeMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).RelativeMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyWeekIndex")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).RelativeMonthlyWeekIndex = (string) content.GetValueForProperty("RelativeMonthlyWeekIndex",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).RelativeMonthlyWeekIndex, global::System.Convert.ToString); + } + if (content.Contains("RelativeMonthlyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).RelativeMonthlyDayOfWeek = (string) content.GetValueForProperty("RelativeMonthlyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal)this).RelativeMonthlyDayOfWeek, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } @@ -253,8 +405,8 @@ public override string ToString() return ToJsonString(); } } - /// See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned - /// maintenance. + /// Planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) + /// for more information about planned maintenance. [System.ComponentModel.TypeConverter(typeof(MaintenanceConfigurationTypeConverter))] public partial interface IMaintenanceConfiguration diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfiguration.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfiguration.cs index bd49908f36c1..66e10196ac52 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfiguration.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfiguration.cs @@ -8,8 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned - /// maintenance. + /// Planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) + /// for more information about planned maintenance. /// public partial class MaintenanceConfiguration : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration, @@ -21,42 +21,105 @@ public partial class MaintenanceConfiguration : /// private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SubResource(); + /// The date of the month. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? AbsoluteMonthlyDayOfMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).AbsoluteMonthlyDayOfMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).AbsoluteMonthlyDayOfMonth = value ?? default(int); } + + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? AbsoluteMonthlyIntervalMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).AbsoluteMonthlyIntervalMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).AbsoluteMonthlyIntervalMonth = value ?? default(int); } + + /// Specifies the number of days between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? DailyIntervalDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).DailyIntervalDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).DailyIntervalDay = value ?? default(int); } + /// Resource ID. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Id; } + /// Length of maintenance window range from 4 to 24 hours. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? MaintenanceWindowDurationHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).MaintenanceWindowDurationHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).MaintenanceWindowDurationHour = value ?? default(int); } + + /// + /// Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' + /// and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 + /// 22:00' in UTC time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowNotAllowedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).MaintenanceWindowNotAllowedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).MaintenanceWindowNotAllowedDate = value ?? null /* arrayOf */; } + + /// + /// The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive + /// and will not be used for upgrades. If not specified, the maintenance window will be active right away. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public global::System.DateTime? MaintenanceWindowStartDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).MaintenanceWindowStartDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).MaintenanceWindowStartDate = value ?? default(global::System.DateTime); } + + /// + /// The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. + /// For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string MaintenanceWindowStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).MaintenanceWindowStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).MaintenanceWindowStartTime = value ?? null; } + + /// + /// The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is + /// '+00:00'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string MaintenanceWindowUtcOffset { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).MaintenanceWindowUtcOffset; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).MaintenanceWindowUtcOffset = value ?? null; } + + /// Internal Acessors for MaintenanceWindow + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.MaintenanceWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).MaintenanceWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).MaintenanceWindow = value ?? null /* model class */; } + + /// Internal Acessors for MaintenanceWindowSchedule + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.MaintenanceWindowSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).MaintenanceWindowSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).MaintenanceWindowSchedule = value ?? null /* model class */; } + /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfigurationProperties()); set { {_property = value;} } } + /// Internal Acessors for ScheduleAbsoluteMonthly + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.ScheduleAbsoluteMonthly { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).ScheduleAbsoluteMonthly; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).ScheduleAbsoluteMonthly = value ?? null /* model class */; } + + /// Internal Acessors for ScheduleDaily + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.ScheduleDaily { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).ScheduleDaily; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).ScheduleDaily = value ?? null /* model class */; } + + /// Internal Acessors for ScheduleRelativeMonthly + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.ScheduleRelativeMonthly { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).ScheduleRelativeMonthly; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).ScheduleRelativeMonthly = value ?? null /* model class */; } + + /// Internal Acessors for ScheduleWeekly + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.ScheduleWeekly { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).ScheduleWeekly; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).ScheduleWeekly = value ?? null /* model class */; } + /// Internal Acessors for SystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for SystemDataCreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// Internal Acessors for SystemDataCreatedBy - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedBy = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// Internal Acessors for SystemDataCreatedByType - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedByType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// Internal Acessors for SystemDataLastModifiedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// Internal Acessors for SystemDataLastModifiedBy - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedBy = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// Internal Acessors for SystemDataLastModifiedByType - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedByType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Name = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Type = value ?? null; } /// /// The name of the resource that is unique within a resource group. This name can be used to access the resource. @@ -75,6 +138,18 @@ public partial class MaintenanceConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfigurationProperties()); set => this._property = value; } + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string RelativeMonthlyDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).RelativeMonthlyDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).RelativeMonthlyDayOfWeek = value ?? null; } + + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? RelativeMonthlyIntervalMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).RelativeMonthlyIntervalMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).RelativeMonthlyIntervalMonth = value ?? default(int); } + + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string RelativeMonthlyWeekIndex { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).RelativeMonthlyWeekIndex; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).RelativeMonthlyWeekIndex = value ?? null; } + /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } @@ -111,7 +186,8 @@ public partial class MaintenanceConfiguration : public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedByType; } /// - /// If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. + /// 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. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public System.Collections.Generic.List TimeInWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).TimeInWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).TimeInWeek = value ?? null /* arrayOf */; } @@ -120,6 +196,14 @@ public partial class MaintenanceConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal)__subResource).Type; } + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string WeeklyDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).WeeklyDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).WeeklyDayOfWeek = value ?? null; } + + /// Specifies the number of weeks between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? WeeklyIntervalWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).WeeklyIntervalWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)Property).WeeklyIntervalWeek = value ?? default(int); } + /// Creates an new instance. public MaintenanceConfiguration() { @@ -138,12 +222,113 @@ public MaintenanceConfiguration() await eventListener.AssertObjectIsValid(nameof(__subResource), __subResource); } } - /// See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned - /// maintenance. + /// Planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) + /// for more information about planned maintenance. public partial interface IMaintenanceConfiguration : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResource { + /// The date of the month. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The date of the month.", + SerializedName = @"dayOfMonth", + PossibleTypes = new [] { typeof(int) })] + int? AbsoluteMonthlyDayOfMonth { get; set; } + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + int? AbsoluteMonthlyIntervalMonth { get; set; } + /// Specifies the number of days between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of days between each set of occurrences.", + SerializedName = @"intervalDays", + PossibleTypes = new [] { typeof(int) })] + int? DailyIntervalDay { get; set; } + /// Length of maintenance window range from 4 to 24 hours. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Length of maintenance window range from 4 to 24 hours.", + SerializedName = @"durationHours", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowDurationHour { get; set; } + /// + /// Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' + /// and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 + /// 22:00' in UTC time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time.", + SerializedName = @"notAllowedDates", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan) })] + System.Collections.Generic.List MaintenanceWindowNotAllowedDate { get; set; } + /// + /// The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive + /// and will not be used for upgrades. If not specified, the maintenance window will be active right away. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away.", + SerializedName = @"startDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? MaintenanceWindowStartDate { get; set; } + /// + /// The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. + /// For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(string) })] + string MaintenanceWindowStartTime { get; set; } + /// + /// The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is + /// '+00:00'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.", + SerializedName = @"utcOffset", + PossibleTypes = new [] { typeof(string) })] + string MaintenanceWindowUtcOffset { get; set; } /// Time slots on which upgrade is not allowed. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -155,6 +340,41 @@ public partial interface IMaintenanceConfiguration : SerializedName = @"notAllowedTime", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpan) })] System.Collections.Generic.List NotAllowedTime { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string RelativeMonthlyDayOfWeek { get; set; } + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + int? RelativeMonthlyIntervalMonth { get; set; } + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The week index. Specifies on which week of the month the dayOfWeek applies.", + SerializedName = @"weekIndex", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + string RelativeMonthlyWeekIndex { get; set; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -224,7 +444,8 @@ public partial interface IMaintenanceConfiguration : [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] string SystemDataLastModifiedByType { get; } /// - /// If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. + /// 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. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -232,21 +453,97 @@ public partial interface IMaintenanceConfiguration : Read = true, Create = true, Update = true, - Description = @"If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.", + Description = @"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.", SerializedName = @"timeInWeek", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek) })] System.Collections.Generic.List TimeInWeek { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string WeeklyDayOfWeek { get; set; } + /// Specifies the number of weeks between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of weeks between each set of occurrences.", + SerializedName = @"intervalWeeks", + PossibleTypes = new [] { typeof(int) })] + int? WeeklyIntervalWeek { get; set; } } - /// See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned - /// maintenance. + /// Planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) + /// for more information about planned maintenance. internal partial interface IMaintenanceConfigurationInternal : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISubResourceInternal { + /// The date of the month. + int? AbsoluteMonthlyDayOfMonth { get; set; } + /// Specifies the number of months between each set of occurrences. + int? AbsoluteMonthlyIntervalMonth { get; set; } + /// Specifies the number of days between each set of occurrences. + int? DailyIntervalDay { get; set; } + /// Maintenance window for the maintenance configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow MaintenanceWindow { get; set; } + /// Length of maintenance window range from 4 to 24 hours. + int? MaintenanceWindowDurationHour { get; set; } + /// + /// Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' + /// and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 + /// 22:00' in UTC time. + /// + System.Collections.Generic.List MaintenanceWindowNotAllowedDate { get; set; } + /// Recurrence schedule for the maintenance window. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule MaintenanceWindowSchedule { get; set; } + /// + /// The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive + /// and will not be used for upgrades. If not specified, the maintenance window will be active right away. + /// + global::System.DateTime? MaintenanceWindowStartDate { get; set; } + /// + /// The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. + /// For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + /// + string MaintenanceWindowStartTime { get; set; } + /// + /// The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is + /// '+00:00'. + /// + string MaintenanceWindowUtcOffset { get; set; } /// Time slots on which upgrade is not allowed. System.Collections.Generic.List NotAllowedTime { get; set; } /// Properties of a default maintenance configuration. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationProperties Property { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string RelativeMonthlyDayOfWeek { get; set; } + /// Specifies the number of months between each set of occurrences. + int? RelativeMonthlyIntervalMonth { get; set; } + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + string RelativeMonthlyWeekIndex { get; set; } + /// + /// For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule ScheduleAbsoluteMonthly { get; set; } + /// For schedules like: 'recur every day' or 'recur every 3 days'. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule ScheduleDaily { get; set; } + /// + /// For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule ScheduleRelativeMonthly { get; set; } + /// For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule ScheduleWeekly { get; set; } /// The system metadata relating to this resource. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). @@ -264,9 +561,15 @@ internal partial interface IMaintenanceConfigurationInternal : [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] string SystemDataLastModifiedByType { get; set; } /// - /// If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. + /// 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. /// System.Collections.Generic.List TimeInWeek { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string WeeklyDayOfWeek { get; set; } + /// Specifies the number of weeks between each set of occurrences. + int? WeeklyIntervalWeek { get; set; } } } \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfiguration.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfiguration.json.cs index 20138096b71d..fc867e6ce628 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfiguration.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfiguration.json.cs @@ -8,8 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned - /// maintenance. + /// Planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) + /// for more information about planned maintenance. /// public partial class MaintenanceConfiguration { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfigurationProperties.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfigurationProperties.PowerShell.cs index 47895265b929..8ff17cd8efb4 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfigurationProperties.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfigurationProperties.PowerShell.cs @@ -111,6 +111,10 @@ internal MaintenanceConfigurationProperties(global::System.Collections.IDictiona return; } // actually deserialize + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceWindowTypeConverter.ConvertFrom); + } if (content.Contains("TimeInWeek")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).TimeInWeek = (System.Collections.Generic.List) content.GetValueForProperty("TimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).TimeInWeek, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TimeInWeekTypeConverter.ConvertFrom)); @@ -119,6 +123,78 @@ internal MaintenanceConfigurationProperties(global::System.Collections.IDictiona { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).NotAllowedTime = (System.Collections.Generic.List) content.GetValueForProperty("NotAllowedTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).NotAllowedTime, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TimeSpanTypeConverter.ConvertFrom)); } + if (content.Contains("MaintenanceWindowSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule) content.GetValueForProperty("MaintenanceWindowSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowSchedule, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("MaintenanceWindowDurationHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowDurationHour = (int?) content.GetValueForProperty("MaintenanceWindowDurationHour",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowDurationHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowUtcOffset")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowUtcOffset = (string) content.GetValueForProperty("MaintenanceWindowUtcOffset",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowUtcOffset, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowStartDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowStartDate = (global::System.DateTime?) content.GetValueForProperty("MaintenanceWindowStartDate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowStartDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("MaintenanceWindowStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowStartTime = (string) content.GetValueForProperty("MaintenanceWindowStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowStartTime, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowNotAllowedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowNotAllowedDate = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowNotAllowedDate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowNotAllowedDate, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DateSpanTypeConverter.ConvertFrom)); + } + if (content.Contains("ScheduleDaily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleDaily = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule) content.GetValueForProperty("ScheduleDaily",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleDaily, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DailyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleWeekly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleWeekly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule) content.GetValueForProperty("ScheduleWeekly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleWeekly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.WeeklyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleAbsoluteMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleAbsoluteMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule) content.GetValueForProperty("ScheduleAbsoluteMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleAbsoluteMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AbsoluteMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleRelativeMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleRelativeMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule) content.GetValueForProperty("ScheduleRelativeMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleRelativeMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RelativeMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("DailyIntervalDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).DailyIntervalDay = (int?) content.GetValueForProperty("DailyIntervalDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).DailyIntervalDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyIntervalWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).WeeklyIntervalWeek = (int?) content.GetValueForProperty("WeeklyIntervalWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).WeeklyIntervalWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).WeeklyDayOfWeek = (string) content.GetValueForProperty("WeeklyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).WeeklyDayOfWeek, global::System.Convert.ToString); + } + if (content.Contains("AbsoluteMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).AbsoluteMonthlyIntervalMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).AbsoluteMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AbsoluteMonthlyDayOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).AbsoluteMonthlyDayOfMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyDayOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).AbsoluteMonthlyDayOfMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).RelativeMonthlyIntervalMonth = (int?) content.GetValueForProperty("RelativeMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).RelativeMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyWeekIndex")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).RelativeMonthlyWeekIndex = (string) content.GetValueForProperty("RelativeMonthlyWeekIndex",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).RelativeMonthlyWeekIndex, global::System.Convert.ToString); + } + if (content.Contains("RelativeMonthlyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).RelativeMonthlyDayOfWeek = (string) content.GetValueForProperty("RelativeMonthlyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).RelativeMonthlyDayOfWeek, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -136,6 +212,10 @@ internal MaintenanceConfigurationProperties(global::System.Management.Automation return; } // actually deserialize + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceWindowTypeConverter.ConvertFrom); + } if (content.Contains("TimeInWeek")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).TimeInWeek = (System.Collections.Generic.List) content.GetValueForProperty("TimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).TimeInWeek, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TimeInWeekTypeConverter.ConvertFrom)); @@ -144,6 +224,78 @@ internal MaintenanceConfigurationProperties(global::System.Management.Automation { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).NotAllowedTime = (System.Collections.Generic.List) content.GetValueForProperty("NotAllowedTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).NotAllowedTime, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TimeSpanTypeConverter.ConvertFrom)); } + if (content.Contains("MaintenanceWindowSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule) content.GetValueForProperty("MaintenanceWindowSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowSchedule, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("MaintenanceWindowDurationHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowDurationHour = (int?) content.GetValueForProperty("MaintenanceWindowDurationHour",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowDurationHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowUtcOffset")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowUtcOffset = (string) content.GetValueForProperty("MaintenanceWindowUtcOffset",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowUtcOffset, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowStartDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowStartDate = (global::System.DateTime?) content.GetValueForProperty("MaintenanceWindowStartDate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowStartDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("MaintenanceWindowStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowStartTime = (string) content.GetValueForProperty("MaintenanceWindowStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowStartTime, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowNotAllowedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowNotAllowedDate = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowNotAllowedDate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).MaintenanceWindowNotAllowedDate, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DateSpanTypeConverter.ConvertFrom)); + } + if (content.Contains("ScheduleDaily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleDaily = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule) content.GetValueForProperty("ScheduleDaily",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleDaily, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DailyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleWeekly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleWeekly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule) content.GetValueForProperty("ScheduleWeekly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleWeekly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.WeeklyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleAbsoluteMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleAbsoluteMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule) content.GetValueForProperty("ScheduleAbsoluteMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleAbsoluteMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AbsoluteMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleRelativeMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleRelativeMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule) content.GetValueForProperty("ScheduleRelativeMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).ScheduleRelativeMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RelativeMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("DailyIntervalDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).DailyIntervalDay = (int?) content.GetValueForProperty("DailyIntervalDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).DailyIntervalDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyIntervalWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).WeeklyIntervalWeek = (int?) content.GetValueForProperty("WeeklyIntervalWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).WeeklyIntervalWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).WeeklyDayOfWeek = (string) content.GetValueForProperty("WeeklyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).WeeklyDayOfWeek, global::System.Convert.ToString); + } + if (content.Contains("AbsoluteMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).AbsoluteMonthlyIntervalMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).AbsoluteMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AbsoluteMonthlyDayOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).AbsoluteMonthlyDayOfMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyDayOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).AbsoluteMonthlyDayOfMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).RelativeMonthlyIntervalMonth = (int?) content.GetValueForProperty("RelativeMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).RelativeMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyWeekIndex")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).RelativeMonthlyWeekIndex = (string) content.GetValueForProperty("RelativeMonthlyWeekIndex",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).RelativeMonthlyWeekIndex, global::System.Convert.ToString); + } + if (content.Contains("RelativeMonthlyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).RelativeMonthlyDayOfWeek = (string) content.GetValueForProperty("RelativeMonthlyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal)this).RelativeMonthlyDayOfWeek, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfigurationProperties.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfigurationProperties.cs index 9ac252a87526..f092dce903fa 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfigurationProperties.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfigurationProperties.cs @@ -13,6 +13,76 @@ public partial class MaintenanceConfigurationProperties : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal { + /// The date of the month. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? AbsoluteMonthlyDayOfMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).AbsoluteMonthlyDayOfMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).AbsoluteMonthlyDayOfMonth = value ?? default(int); } + + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? AbsoluteMonthlyIntervalMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).AbsoluteMonthlyIntervalMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).AbsoluteMonthlyIntervalMonth = value ?? default(int); } + + /// Specifies the number of days between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? DailyIntervalDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).DailyIntervalDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).DailyIntervalDay = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow _maintenanceWindow; + + /// Maintenance window for the maintenance configuration. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow MaintenanceWindow { get => (this._maintenanceWindow = this._maintenanceWindow ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceWindow()); set => this._maintenanceWindow = value; } + + /// Length of maintenance window range from 4 to 24 hours. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? MaintenanceWindowDurationHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).DurationHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).DurationHour = value ?? default(int); } + + /// + /// Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' + /// and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 + /// 22:00' in UTC time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowNotAllowedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).NotAllowedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).NotAllowedDate = value ?? null /* arrayOf */; } + + /// + /// The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive + /// and will not be used for upgrades. If not specified, the maintenance window will be active right away. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public global::System.DateTime? MaintenanceWindowStartDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).StartDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).StartDate = value ?? default(global::System.DateTime); } + + /// + /// The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. + /// For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string MaintenanceWindowStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).StartTime = value ?? null; } + + /// + /// The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is + /// '+00:00'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string MaintenanceWindowUtcOffset { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).UtcOffset; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).UtcOffset = value ?? null; } + + /// Internal Acessors for MaintenanceWindow + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal.MaintenanceWindow { get => (this._maintenanceWindow = this._maintenanceWindow ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceWindow()); set { {_maintenanceWindow = value;} } } + + /// Internal Acessors for MaintenanceWindowSchedule + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal.MaintenanceWindowSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).Schedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).Schedule = value ?? null /* model class */; } + + /// Internal Acessors for ScheduleAbsoluteMonthly + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal.ScheduleAbsoluteMonthly { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).ScheduleAbsoluteMonthly; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).ScheduleAbsoluteMonthly = value ?? null /* model class */; } + + /// Internal Acessors for ScheduleDaily + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal.ScheduleDaily { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).ScheduleDaily; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).ScheduleDaily = value ?? null /* model class */; } + + /// Internal Acessors for ScheduleRelativeMonthly + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal.ScheduleRelativeMonthly { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).ScheduleRelativeMonthly; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).ScheduleRelativeMonthly = value ?? null /* model class */; } + + /// Internal Acessors for ScheduleWeekly + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfigurationPropertiesInternal.ScheduleWeekly { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).ScheduleWeekly; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).ScheduleWeekly = value ?? null /* model class */; } + /// Backing field for property. private System.Collections.Generic.List _notAllowedTime; @@ -20,15 +90,36 @@ public partial class MaintenanceConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public System.Collections.Generic.List NotAllowedTime { get => this._notAllowedTime; set => this._notAllowedTime = value; } + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string RelativeMonthlyDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).RelativeMonthlyDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).RelativeMonthlyDayOfWeek = value ?? null; } + + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? RelativeMonthlyIntervalMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).RelativeMonthlyIntervalMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).RelativeMonthlyIntervalMonth = value ?? default(int); } + + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string RelativeMonthlyWeekIndex { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).RelativeMonthlyWeekIndex; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).RelativeMonthlyWeekIndex = value ?? null; } + /// Backing field for property. private System.Collections.Generic.List _timeInWeek; /// - /// If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. + /// 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. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public System.Collections.Generic.List TimeInWeek { get => this._timeInWeek; set => this._timeInWeek = value; } + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string WeeklyDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).WeeklyDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).WeeklyDayOfWeek = value ?? null; } + + /// Specifies the number of weeks between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? WeeklyIntervalWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).WeeklyIntervalWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)MaintenanceWindow).WeeklyIntervalWeek = value ?? default(int); } + /// Creates an new instance. public MaintenanceConfigurationProperties() { @@ -39,6 +130,107 @@ public MaintenanceConfigurationProperties() public partial interface IMaintenanceConfigurationProperties : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { + /// The date of the month. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The date of the month.", + SerializedName = @"dayOfMonth", + PossibleTypes = new [] { typeof(int) })] + int? AbsoluteMonthlyDayOfMonth { get; set; } + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + int? AbsoluteMonthlyIntervalMonth { get; set; } + /// Specifies the number of days between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of days between each set of occurrences.", + SerializedName = @"intervalDays", + PossibleTypes = new [] { typeof(int) })] + int? DailyIntervalDay { get; set; } + /// Length of maintenance window range from 4 to 24 hours. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Length of maintenance window range from 4 to 24 hours.", + SerializedName = @"durationHours", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowDurationHour { get; set; } + /// + /// Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' + /// and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 + /// 22:00' in UTC time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time.", + SerializedName = @"notAllowedDates", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan) })] + System.Collections.Generic.List MaintenanceWindowNotAllowedDate { get; set; } + /// + /// The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive + /// and will not be used for upgrades. If not specified, the maintenance window will be active right away. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away.", + SerializedName = @"startDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? MaintenanceWindowStartDate { get; set; } + /// + /// The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. + /// For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(string) })] + string MaintenanceWindowStartTime { get; set; } + /// + /// The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is + /// '+00:00'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.", + SerializedName = @"utcOffset", + PossibleTypes = new [] { typeof(string) })] + string MaintenanceWindowUtcOffset { get; set; } /// Time slots on which upgrade is not allowed. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -50,8 +242,44 @@ public partial interface IMaintenanceConfigurationProperties : SerializedName = @"notAllowedTime", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpan) })] System.Collections.Generic.List NotAllowedTime { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string RelativeMonthlyDayOfWeek { get; set; } + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + int? RelativeMonthlyIntervalMonth { get; set; } + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The week index. Specifies on which week of the month the dayOfWeek applies.", + SerializedName = @"weekIndex", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + string RelativeMonthlyWeekIndex { get; set; } /// - /// If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. + /// 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. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -59,22 +287,104 @@ public partial interface IMaintenanceConfigurationProperties : Read = true, Create = true, Update = true, - Description = @"If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.", + Description = @"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.", SerializedName = @"timeInWeek", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek) })] System.Collections.Generic.List TimeInWeek { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string WeeklyDayOfWeek { get; set; } + /// Specifies the number of weeks between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of weeks between each set of occurrences.", + SerializedName = @"intervalWeeks", + PossibleTypes = new [] { typeof(int) })] + int? WeeklyIntervalWeek { get; set; } } /// Properties used to configure planned maintenance for a Managed Cluster. internal partial interface IMaintenanceConfigurationPropertiesInternal { + /// The date of the month. + int? AbsoluteMonthlyDayOfMonth { get; set; } + /// Specifies the number of months between each set of occurrences. + int? AbsoluteMonthlyIntervalMonth { get; set; } + /// Specifies the number of days between each set of occurrences. + int? DailyIntervalDay { get; set; } + /// Maintenance window for the maintenance configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow MaintenanceWindow { get; set; } + /// Length of maintenance window range from 4 to 24 hours. + int? MaintenanceWindowDurationHour { get; set; } + /// + /// Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' + /// and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 + /// 22:00' in UTC time. + /// + System.Collections.Generic.List MaintenanceWindowNotAllowedDate { get; set; } + /// Recurrence schedule for the maintenance window. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule MaintenanceWindowSchedule { get; set; } + /// + /// The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive + /// and will not be used for upgrades. If not specified, the maintenance window will be active right away. + /// + global::System.DateTime? MaintenanceWindowStartDate { get; set; } + /// + /// The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. + /// For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + /// + string MaintenanceWindowStartTime { get; set; } + /// + /// The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is + /// '+00:00'. + /// + string MaintenanceWindowUtcOffset { get; set; } /// Time slots on which upgrade is not allowed. System.Collections.Generic.List NotAllowedTime { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string RelativeMonthlyDayOfWeek { get; set; } + /// Specifies the number of months between each set of occurrences. + int? RelativeMonthlyIntervalMonth { get; set; } + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + string RelativeMonthlyWeekIndex { get; set; } + /// + /// For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule ScheduleAbsoluteMonthly { get; set; } + /// For schedules like: 'recur every day' or 'recur every 3 days'. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule ScheduleDaily { get; set; } + /// + /// For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule ScheduleRelativeMonthly { get; set; } + /// For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule ScheduleWeekly { get; set; } /// - /// If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. + /// 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. /// System.Collections.Generic.List TimeInWeek { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string WeeklyDayOfWeek { get; set; } + /// Specifies the number of weeks between each set of occurrences. + int? WeeklyIntervalWeek { get; set; } } } \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfigurationProperties.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfigurationProperties.json.cs index a7d06587cac5..9f74b946a53d 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfigurationProperties.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceConfigurationProperties.json.cs @@ -77,6 +77,7 @@ internal MaintenanceConfigurationProperties(Microsoft.Azure.PowerShell.Cmdlets.A { return; } + {_maintenanceWindow = If( json?.PropertyT("maintenanceWindow"), out var __jsonMaintenanceWindow) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceWindow.FromJson(__jsonMaintenanceWindow) : _maintenanceWindow;} {_timeInWeek = If( json?.PropertyT("timeInWeek"), out var __jsonTimeInWeek) ? If( __jsonTimeInWeek as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TimeInWeek.FromJson(__u) )) ))() : null : _timeInWeek;} {_notAllowedTime = If( json?.PropertyT("notAllowedTime"), out var __jsonNotAllowedTime) ? If( __jsonNotAllowedTime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpan) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TimeSpan.FromJson(__p) )) ))() : null : _notAllowedTime;} AfterFromJson(json); @@ -102,6 +103,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } + AddIf( null != this._maintenanceWindow ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._maintenanceWindow.ToJson(null,serializationMode) : null, "maintenanceWindow" ,container.Add ); if (null != this._timeInWeek) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceWindow.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceWindow.PowerShell.cs new file mode 100644 index 000000000000..3f44419f1edb --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceWindow.PowerShell.cs @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// Maintenance window used to configure scheduled auto-upgrade for a Managed Cluster. + /// + [System.ComponentModel.TypeConverter(typeof(MaintenanceWindowTypeConverter))] + public partial class MaintenanceWindow + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceWindow(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceWindow(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MaintenanceWindow(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Schedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).Schedule = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule) content.GetValueForProperty("Schedule",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).Schedule, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("DurationHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).DurationHour = (int) content.GetValueForProperty("DurationHour",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).DurationHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UtcOffset")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).UtcOffset = (string) content.GetValueForProperty("UtcOffset",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).UtcOffset, global::System.Convert.ToString); + } + if (content.Contains("StartDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).StartDate = (global::System.DateTime?) content.GetValueForProperty("StartDate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).StartDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).StartTime = (string) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).StartTime, global::System.Convert.ToString); + } + if (content.Contains("NotAllowedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).NotAllowedDate = (System.Collections.Generic.List) content.GetValueForProperty("NotAllowedDate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).NotAllowedDate, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DateSpanTypeConverter.ConvertFrom)); + } + if (content.Contains("ScheduleDaily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleDaily = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule) content.GetValueForProperty("ScheduleDaily",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleDaily, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DailyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleWeekly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleWeekly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule) content.GetValueForProperty("ScheduleWeekly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleWeekly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.WeeklyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleAbsoluteMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleAbsoluteMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule) content.GetValueForProperty("ScheduleAbsoluteMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleAbsoluteMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AbsoluteMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleRelativeMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleRelativeMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule) content.GetValueForProperty("ScheduleRelativeMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleRelativeMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RelativeMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("DailyIntervalDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).DailyIntervalDay = (int?) content.GetValueForProperty("DailyIntervalDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).DailyIntervalDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyIntervalWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).WeeklyIntervalWeek = (int?) content.GetValueForProperty("WeeklyIntervalWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).WeeklyIntervalWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).WeeklyDayOfWeek = (string) content.GetValueForProperty("WeeklyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).WeeklyDayOfWeek, global::System.Convert.ToString); + } + if (content.Contains("AbsoluteMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).AbsoluteMonthlyIntervalMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).AbsoluteMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AbsoluteMonthlyDayOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).AbsoluteMonthlyDayOfMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyDayOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).AbsoluteMonthlyDayOfMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).RelativeMonthlyIntervalMonth = (int?) content.GetValueForProperty("RelativeMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).RelativeMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyWeekIndex")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).RelativeMonthlyWeekIndex = (string) content.GetValueForProperty("RelativeMonthlyWeekIndex",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).RelativeMonthlyWeekIndex, global::System.Convert.ToString); + } + if (content.Contains("RelativeMonthlyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).RelativeMonthlyDayOfWeek = (string) content.GetValueForProperty("RelativeMonthlyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).RelativeMonthlyDayOfWeek, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MaintenanceWindow(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Schedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).Schedule = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule) content.GetValueForProperty("Schedule",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).Schedule, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("DurationHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).DurationHour = (int) content.GetValueForProperty("DurationHour",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).DurationHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UtcOffset")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).UtcOffset = (string) content.GetValueForProperty("UtcOffset",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).UtcOffset, global::System.Convert.ToString); + } + if (content.Contains("StartDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).StartDate = (global::System.DateTime?) content.GetValueForProperty("StartDate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).StartDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).StartTime = (string) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).StartTime, global::System.Convert.ToString); + } + if (content.Contains("NotAllowedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).NotAllowedDate = (System.Collections.Generic.List) content.GetValueForProperty("NotAllowedDate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).NotAllowedDate, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DateSpanTypeConverter.ConvertFrom)); + } + if (content.Contains("ScheduleDaily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleDaily = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule) content.GetValueForProperty("ScheduleDaily",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleDaily, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DailyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleWeekly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleWeekly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule) content.GetValueForProperty("ScheduleWeekly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleWeekly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.WeeklyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleAbsoluteMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleAbsoluteMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule) content.GetValueForProperty("ScheduleAbsoluteMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleAbsoluteMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AbsoluteMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduleRelativeMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleRelativeMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule) content.GetValueForProperty("ScheduleRelativeMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).ScheduleRelativeMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RelativeMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("DailyIntervalDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).DailyIntervalDay = (int?) content.GetValueForProperty("DailyIntervalDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).DailyIntervalDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyIntervalWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).WeeklyIntervalWeek = (int?) content.GetValueForProperty("WeeklyIntervalWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).WeeklyIntervalWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).WeeklyDayOfWeek = (string) content.GetValueForProperty("WeeklyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).WeeklyDayOfWeek, global::System.Convert.ToString); + } + if (content.Contains("AbsoluteMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).AbsoluteMonthlyIntervalMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).AbsoluteMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AbsoluteMonthlyDayOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).AbsoluteMonthlyDayOfMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyDayOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).AbsoluteMonthlyDayOfMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).RelativeMonthlyIntervalMonth = (int?) content.GetValueForProperty("RelativeMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).RelativeMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyWeekIndex")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).RelativeMonthlyWeekIndex = (string) content.GetValueForProperty("RelativeMonthlyWeekIndex",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).RelativeMonthlyWeekIndex, global::System.Convert.ToString); + } + if (content.Contains("RelativeMonthlyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).RelativeMonthlyDayOfWeek = (string) content.GetValueForProperty("RelativeMonthlyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal)this).RelativeMonthlyDayOfWeek, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Maintenance window used to configure scheduled auto-upgrade for a Managed Cluster. + [System.ComponentModel.TypeConverter(typeof(MaintenanceWindowTypeConverter))] + public partial interface IMaintenanceWindow + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceWindow.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceWindow.TypeConverter.cs new file mode 100644 index 000000000000..3c3b66208b8e --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceWindow.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenanceWindowTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MaintenanceWindow.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MaintenanceWindow.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MaintenanceWindow.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceWindow.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceWindow.cs new file mode 100644 index 000000000000..176bbe125d9a --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceWindow.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Maintenance window used to configure scheduled auto-upgrade for a Managed Cluster. + /// + public partial class MaintenanceWindow : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal + { + + /// The date of the month. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? AbsoluteMonthlyDayOfMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).AbsoluteMonthlyDayOfMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).AbsoluteMonthlyDayOfMonth = value ?? default(int); } + + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? AbsoluteMonthlyIntervalMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).AbsoluteMonthlyIntervalMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).AbsoluteMonthlyIntervalMonth = value ?? default(int); } + + /// Specifies the number of days between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? DailyIntervalDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).DailyIntervalDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).DailyIntervalDay = value ?? default(int); } + + /// Backing field for property. + private int _durationHour; + + /// Length of maintenance window range from 4 to 24 hours. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int DurationHour { get => this._durationHour; set => this._durationHour = value; } + + /// Internal Acessors for Schedule + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal.Schedule { get => (this._schedule = this._schedule ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Schedule()); set { {_schedule = value;} } } + + /// Internal Acessors for ScheduleAbsoluteMonthly + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal.ScheduleAbsoluteMonthly { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).AbsoluteMonthly; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).AbsoluteMonthly = value ?? null /* model class */; } + + /// Internal Acessors for ScheduleDaily + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal.ScheduleDaily { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).Daily; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).Daily = value ?? null /* model class */; } + + /// Internal Acessors for ScheduleRelativeMonthly + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal.ScheduleRelativeMonthly { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).RelativeMonthly; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).RelativeMonthly = value ?? null /* model class */; } + + /// Internal Acessors for ScheduleWeekly + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindowInternal.ScheduleWeekly { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).Weekly; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).Weekly = value ?? null /* model class */; } + + /// Backing field for property. + private System.Collections.Generic.List _notAllowedDate; + + /// + /// Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' + /// and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 + /// 22:00' in UTC time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List NotAllowedDate { get => this._notAllowedDate; set => this._notAllowedDate = value; } + + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string RelativeMonthlyDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).RelativeMonthlyDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).RelativeMonthlyDayOfWeek = value ?? null; } + + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? RelativeMonthlyIntervalMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).RelativeMonthlyIntervalMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).RelativeMonthlyIntervalMonth = value ?? default(int); } + + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string RelativeMonthlyWeekIndex { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).RelativeMonthlyWeekIndex; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).RelativeMonthlyWeekIndex = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule _schedule; + + /// Recurrence schedule for the maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule Schedule { get => (this._schedule = this._schedule ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Schedule()); set => this._schedule = value; } + + /// Backing field for property. + private global::System.DateTime? _startDate; + + /// + /// The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive + /// and will not be used for upgrades. If not specified, the maintenance window will be active right away. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public global::System.DateTime? StartDate { get => this._startDate; set => this._startDate = value; } + + /// Backing field for property. + private string _startTime; + + /// + /// The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. + /// For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string StartTime { get => this._startTime; set => this._startTime = value; } + + /// Backing field for property. + private string _utcOffset; + + /// + /// The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is + /// '+00:00'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string UtcOffset { get => this._utcOffset; set => this._utcOffset = value; } + + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string WeeklyDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).WeeklyDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).WeeklyDayOfWeek = value ?? null; } + + /// Specifies the number of weeks between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? WeeklyIntervalWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).WeeklyIntervalWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)Schedule).WeeklyIntervalWeek = value ?? default(int); } + + /// Creates an new instance. + public MaintenanceWindow() + { + + } + } + /// Maintenance window used to configure scheduled auto-upgrade for a Managed Cluster. + public partial interface IMaintenanceWindow : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The date of the month. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The date of the month.", + SerializedName = @"dayOfMonth", + PossibleTypes = new [] { typeof(int) })] + int? AbsoluteMonthlyDayOfMonth { get; set; } + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + int? AbsoluteMonthlyIntervalMonth { get; set; } + /// Specifies the number of days between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of days between each set of occurrences.", + SerializedName = @"intervalDays", + PossibleTypes = new [] { typeof(int) })] + int? DailyIntervalDay { get; set; } + /// Length of maintenance window range from 4 to 24 hours. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Length of maintenance window range from 4 to 24 hours.", + SerializedName = @"durationHours", + PossibleTypes = new [] { typeof(int) })] + int DurationHour { get; set; } + /// + /// Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' + /// and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 + /// 22:00' in UTC time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time.", + SerializedName = @"notAllowedDates", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan) })] + System.Collections.Generic.List NotAllowedDate { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string RelativeMonthlyDayOfWeek { get; set; } + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + int? RelativeMonthlyIntervalMonth { get; set; } + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The week index. Specifies on which week of the month the dayOfWeek applies.", + SerializedName = @"weekIndex", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + string RelativeMonthlyWeekIndex { get; set; } + /// + /// The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive + /// and will not be used for upgrades. If not specified, the maintenance window will be active right away. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away.", + SerializedName = @"startDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartDate { get; set; } + /// + /// The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. + /// For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(string) })] + string StartTime { get; set; } + /// + /// The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is + /// '+00:00'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.", + SerializedName = @"utcOffset", + PossibleTypes = new [] { typeof(string) })] + string UtcOffset { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string WeeklyDayOfWeek { get; set; } + /// Specifies the number of weeks between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of weeks between each set of occurrences.", + SerializedName = @"intervalWeeks", + PossibleTypes = new [] { typeof(int) })] + int? WeeklyIntervalWeek { get; set; } + + } + /// Maintenance window used to configure scheduled auto-upgrade for a Managed Cluster. + internal partial interface IMaintenanceWindowInternal + + { + /// The date of the month. + int? AbsoluteMonthlyDayOfMonth { get; set; } + /// Specifies the number of months between each set of occurrences. + int? AbsoluteMonthlyIntervalMonth { get; set; } + /// Specifies the number of days between each set of occurrences. + int? DailyIntervalDay { get; set; } + /// Length of maintenance window range from 4 to 24 hours. + int DurationHour { get; set; } + /// + /// Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' + /// and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 + /// 22:00' in UTC time. + /// + System.Collections.Generic.List NotAllowedDate { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string RelativeMonthlyDayOfWeek { get; set; } + /// Specifies the number of months between each set of occurrences. + int? RelativeMonthlyIntervalMonth { get; set; } + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + string RelativeMonthlyWeekIndex { get; set; } + /// Recurrence schedule for the maintenance window. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule Schedule { get; set; } + /// + /// For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule ScheduleAbsoluteMonthly { get; set; } + /// For schedules like: 'recur every day' or 'recur every 3 days'. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule ScheduleDaily { get; set; } + /// + /// For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule ScheduleRelativeMonthly { get; set; } + /// For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule ScheduleWeekly { get; set; } + /// + /// The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive + /// and will not be used for upgrades. If not specified, the maintenance window will be active right away. + /// + global::System.DateTime? StartDate { get; set; } + /// + /// The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. + /// For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + /// + string StartTime { get; set; } + /// + /// The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is + /// '+00:00'. + /// + string UtcOffset { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string WeeklyDayOfWeek { get; set; } + /// Specifies the number of weeks between each set of occurrences. + int? WeeklyIntervalWeek { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceWindow.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceWindow.json.cs new file mode 100644 index 000000000000..28d20143cfb9 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MaintenanceWindow.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Maintenance window used to configure scheduled auto-upgrade for a Managed Cluster. + /// + public partial class MaintenanceWindow + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceWindow FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MaintenanceWindow(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal MaintenanceWindow(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_schedule = If( json?.PropertyT("schedule"), out var __jsonSchedule) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Schedule.FromJson(__jsonSchedule) : _schedule;} + {_durationHour = If( json?.PropertyT("durationHours"), out var __jsonDurationHours) ? (int)__jsonDurationHours : _durationHour;} + {_utcOffset = If( json?.PropertyT("utcOffset"), out var __jsonUtcOffset) ? (string)__jsonUtcOffset : (string)_utcOffset;} + {_startDate = If( json?.PropertyT("startDate"), out var __jsonStartDate) ? global::System.DateTime.TryParse((string)__jsonStartDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartDateValue) ? __jsonStartDateValue : _startDate : _startDate;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? (string)__jsonStartTime : (string)_startTime;} + {_notAllowedDate = If( json?.PropertyT("notAllowedDates"), out var __jsonNotAllowedDates) ? If( __jsonNotAllowedDates as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DateSpan.FromJson(__u) )) ))() : null : _notAllowedDate;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._schedule ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._schedule.ToJson(null,serializationMode) : null, "schedule" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber(this._durationHour), "durationHours" ,container.Add ); + AddIf( null != (((object)this._utcOffset)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._utcOffset.ToString()) : null, "utcOffset" ,container.Add ); + AddIf( null != this._startDate ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._startDate?.ToString(@"yyyy-MM-dd",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startDate" ,container.Add ); + AddIf( null != (((object)this._startTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._startTime.ToString()) : null, "startTime" ,container.Add ); + if (null != this._notAllowedDate) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._notAllowedDate ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("notAllowedDates",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedCluster.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedCluster.PowerShell.cs index df88c794a31f..66ba984b6c92 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedCluster.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedCluster.PowerShell.cs @@ -125,6 +125,14 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPropertiesTypeConverter.ConvertFrom); } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ETag, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).Kind, global::System.Convert.ToString); + } if (content.Contains("SystemDataCreatedBy")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); @@ -177,6 +185,10 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ExtendedLocationName = (string) content.GetValueForProperty("ExtendedLocationName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ExtendedLocationName, global::System.Convert.ToString); } + if (content.Contains("IdentityDelegatedResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityDelegatedResource = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources) content.GetValueForProperty("IdentityDelegatedResource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityDelegatedResource, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DelegatedResourcesTypeConverter.ConvertFrom); + } if (content.Contains("PowerState")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PowerStateTypeConverter.ConvertFrom); @@ -229,6 +241,10 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterOidcIssuerProfileTypeConverter.ConvertFrom); } + if (content.Contains("NodeResourceGroupProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeResourceGroupProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile) content.GetValueForProperty("NodeResourceGroupProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeResourceGroupProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeResourceGroupProfileTypeConverter.ConvertFrom); + } if (content.Contains("AadProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAadProfileTypeConverter.ConvertFrom); @@ -237,6 +253,10 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoUpgradeProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfile) content.GetValueForProperty("AutoUpgradeProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoUpgradeProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAutoUpgradeProfileTypeConverter.ConvertFrom); } + if (content.Contains("UpgradeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ClusterUpgradeSettingsTypeConverter.ConvertFrom); + } if (content.Contains("AutoScalerProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfile) content.GetValueForProperty("AutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPropertiesAutoScalerProfileTypeConverter.ConvertFrom); @@ -257,6 +277,10 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileTypeConverter.ConvertFrom); } + if (content.Contains("IngressProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IngressProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile) content.GetValueForProperty("IngressProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IngressProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileTypeConverter.ConvertFrom); + } if (content.Contains("WorkloadAutoScalerProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WorkloadAutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfile) content.GetValueForProperty("WorkloadAutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WorkloadAutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileTypeConverter.ConvertFrom); @@ -265,6 +289,30 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AzureMonitorProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfile) content.GetValueForProperty("AzureMonitorProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AzureMonitorProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfileTypeConverter.ConvertFrom); } + if (content.Contains("ServiceMeshProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ServiceMeshProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile) content.GetValueForProperty("ServiceMeshProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ServiceMeshProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ServiceMeshProfileTypeConverter.ConvertFrom); + } + if (content.Contains("MetricsProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile) content.GetValueForProperty("MetricsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterMetricsProfileTypeConverter.ConvertFrom); + } + if (content.Contains("NodeProvisioningProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeProvisioningProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile) content.GetValueForProperty("NodeProvisioningProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeProvisioningProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeProvisioningProfileTypeConverter.ConvertFrom); + } + if (content.Contains("BootstrapProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BootstrapProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile) content.GetValueForProperty("BootstrapProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BootstrapProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterBootstrapProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AiToolchainOperatorProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AiToolchainOperatorProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile) content.GetValueForProperty("AiToolchainOperatorProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AiToolchainOperatorProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAiToolchainOperatorProfileTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStatusTypeConverter.ConvertFrom); + } if (content.Contains("ProvisioningState")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningState, global::System.Convert.ToString); @@ -317,9 +365,9 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).EnableRbac = (bool?) content.GetValueForProperty("EnableRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).EnableRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("EnablePodSecurityPolicy")) + if (content.Contains("SupportPlan")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).EnablePodSecurityPolicy = (bool?) content.GetValueForProperty("EnablePodSecurityPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).EnablePodSecurityPolicy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SupportPlan = (string) content.GetValueForProperty("SupportPlan",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SupportPlan, global::System.Convert.ToString); } if (content.Contains("DiskEncryptionSetId")) { @@ -341,6 +389,10 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PublicNetworkAccess, global::System.Convert.ToString); } + if (content.Contains("ResourceUid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ResourceUid = (string) content.GetValueForProperty("ResourceUid",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ResourceUid, global::System.Convert.ToString); + } if (content.Contains("NetworkProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceNetworkProfileTypeConverter.ConvertFrom); @@ -353,6 +405,10 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WindowProfileLicenseType = (string) content.GetValueForProperty("WindowProfileLicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WindowProfileLicenseType, global::System.Convert.ToString); } + if (content.Contains("NodeResourceGroupProfileRestrictionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeResourceGroupProfileRestrictionLevel = (string) content.GetValueForProperty("NodeResourceGroupProfileRestrictionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeResourceGroupProfileRestrictionLevel, global::System.Convert.ToString); + } if (content.Contains("AutoUpgradeProfileUpgradeChannel")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoUpgradeProfileUpgradeChannel = (string) content.GetValueForProperty("AutoUpgradeProfileUpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoUpgradeProfileUpgradeChannel, global::System.Convert.ToString); @@ -361,6 +417,10 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileExpander = (string) content.GetValueForProperty("AutoScalerProfileExpander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileExpander, global::System.Convert.ToString); } + if (content.Contains("BootstrapProfileArtifactSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BootstrapProfileArtifactSource = (string) content.GetValueForProperty("BootstrapProfileArtifactSource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BootstrapProfileArtifactSource, global::System.Convert.ToString); + } if (content.Contains("LinuxProfileSsh")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).LinuxProfileSsh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceSshConfiguration) content.GetValueForProperty("LinuxProfileSsh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).LinuxProfileSsh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); @@ -445,10 +505,30 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AadProfileTenantId, global::System.Convert.ToString); } + if (content.Contains("AutoUpgradeProfileNodeOSUpgradeChannel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoUpgradeProfileNodeOSUpgradeChannel = (string) content.GetValueForProperty("AutoUpgradeProfileNodeOSUpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoUpgradeProfileNodeOSUpgradeChannel, global::System.Convert.ToString); + } + if (content.Contains("UpgradeSettingOverrideSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).UpgradeSettingOverrideSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings) content.GetValueForProperty("UpgradeSettingOverrideSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).UpgradeSettingOverrideSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UpgradeOverrideSettingsTypeConverter.ConvertFrom); + } if (content.Contains("AutoScalerProfileBalanceSimilarNodeGroup")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup = (string) content.GetValueForProperty("AutoScalerProfileBalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup, global::System.Convert.ToString); } + if (content.Contains("AutoScalerProfileDaemonsetEvictionForEmptyNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileDaemonsetEvictionForEmptyNode = (bool?) content.GetValueForProperty("AutoScalerProfileDaemonsetEvictionForEmptyNode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileDaemonsetEvictionForEmptyNode, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoScalerProfileDaemonsetEvictionForOccupiedNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileDaemonsetEvictionForOccupiedNode = (bool?) content.GetValueForProperty("AutoScalerProfileDaemonsetEvictionForOccupiedNode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileDaemonsetEvictionForOccupiedNode, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoScalerProfileIgnoreDaemonsetsUtilization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileIgnoreDaemonsetsUtilization = (bool?) content.GetValueForProperty("AutoScalerProfileIgnoreDaemonsetsUtilization",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileIgnoreDaemonsetsUtilization, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("AutoScalerProfileMaxEmptyBulkDelete")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete = (string) content.GetValueForProperty("AutoScalerProfileMaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete, global::System.Convert.ToString); @@ -529,6 +609,14 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ApiServerAccessProfileDisableRunCommand = (bool?) content.GetValueForProperty("ApiServerAccessProfileDisableRunCommand",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ApiServerAccessProfileDisableRunCommand, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("ApiServerAccessProfileEnableVnetIntegration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ApiServerAccessProfileEnableVnetIntegration = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnableVnetIntegration",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ApiServerAccessProfileEnableVnetIntegration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApiServerAccessProfileSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ApiServerAccessProfileSubnetId = (string) content.GetValueForProperty("ApiServerAccessProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ApiServerAccessProfileSubnetId, global::System.Convert.ToString); + } if (content.Contains("HttpProxyConfigHttpProxy")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).HttpProxyConfigHttpProxy = (string) content.GetValueForProperty("HttpProxyConfigHttpProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).HttpProxyConfigHttpProxy, global::System.Convert.ToString); @@ -561,6 +649,10 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SecurityProfileImageCleaner = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileImageCleaner) content.GetValueForProperty("SecurityProfileImageCleaner",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SecurityProfileImageCleaner, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfileImageCleanerTypeConverter.ConvertFrom); } + if (content.Contains("SecurityProfileCustomCaTrustCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SecurityProfileCustomCaTrustCertificate = (System.Collections.Generic.List) content.GetValueForProperty("SecurityProfileCustomCaTrustCertificate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SecurityProfileCustomCaTrustCertificate, __y => TypeConverterExtensions.SelectToList(__y, i => i)); + } if (content.Contains("AzureKeyVaultKmKeyId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AzureKeyVaultKmKeyId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AzureKeyVaultKmKeyId, global::System.Convert.ToString); @@ -581,14 +673,62 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).StorageProfileBlobCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileBlobCsiDriver) content.GetValueForProperty("StorageProfileBlobCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).StorageProfileBlobCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileBlobCsiDriverTypeConverter.ConvertFrom); } + if (content.Contains("IngressProfileWebAppRouting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IngressProfileWebAppRouting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting) content.GetValueForProperty("IngressProfileWebAppRouting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IngressProfileWebAppRouting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileWebAppRoutingTypeConverter.ConvertFrom); + } if (content.Contains("WorkloadAutoScalerProfileKeda")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WorkloadAutoScalerProfileKeda = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileKeda) content.GetValueForProperty("WorkloadAutoScalerProfileKeda",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WorkloadAutoScalerProfileKeda, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter.ConvertFrom); } + if (content.Contains("WorkloadAutoScalerProfileVerticalPodAutoscaler")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WorkloadAutoScalerProfileVerticalPodAutoscaler = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) content.GetValueForProperty("WorkloadAutoScalerProfileVerticalPodAutoscaler",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WorkloadAutoScalerProfileVerticalPodAutoscaler, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerTypeConverter.ConvertFrom); + } if (content.Contains("AzureMonitorProfileMetric")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AzureMonitorProfileMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetrics) content.GetValueForProperty("AzureMonitorProfileMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AzureMonitorProfileMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfileMetricsTypeConverter.ConvertFrom); } + if (content.Contains("ServiceMeshProfileIstio")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ServiceMeshProfileIstio = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh) content.GetValueForProperty("ServiceMeshProfileIstio",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ServiceMeshProfileIstio, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioServiceMeshTypeConverter.ConvertFrom); + } + if (content.Contains("ServiceMeshProfileMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ServiceMeshProfileMode = (string) content.GetValueForProperty("ServiceMeshProfileMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ServiceMeshProfileMode, global::System.Convert.ToString); + } + if (content.Contains("IstioComponent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IstioComponent = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents) content.GetValueForProperty("IstioComponent",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IstioComponent, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioComponentsTypeConverter.ConvertFrom); + } + if (content.Contains("IstioCertificateAuthority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IstioCertificateAuthority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority) content.GetValueForProperty("IstioCertificateAuthority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IstioCertificateAuthority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("MetricProfileCostAnalysis")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricProfileCostAnalysis = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis) content.GetValueForProperty("MetricProfileCostAnalysis",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricProfileCostAnalysis, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterCostAnalysisTypeConverter.ConvertFrom); + } + if (content.Contains("NodeProvisioningProfileMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeProvisioningProfileMode = (string) content.GetValueForProperty("NodeProvisioningProfileMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeProvisioningProfileMode, global::System.Convert.ToString); + } + if (content.Contains("NodeProvisioningProfileDefaultNodePool")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeProvisioningProfileDefaultNodePool = (string) content.GetValueForProperty("NodeProvisioningProfileDefaultNodePool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeProvisioningProfileDefaultNodePool, global::System.Convert.ToString); + } + if (content.Contains("BootstrapProfileContainerRegistryId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BootstrapProfileContainerRegistryId = (string) content.GetValueForProperty("BootstrapProfileContainerRegistryId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BootstrapProfileContainerRegistryId, global::System.Convert.ToString); + } + if (content.Contains("AiToolchainOperatorProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AiToolchainOperatorProfileEnabled = (bool?) content.GetValueForProperty("AiToolchainOperatorProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AiToolchainOperatorProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("StatusProvisioningError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).StatusProvisioningError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("StatusProvisioningError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).StatusProvisioningError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } if (content.Contains("SshPublicKey")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SshPublicKey = (System.Collections.Generic.List) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); @@ -605,6 +745,14 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).GmsaProfileRootDomainName = (string) content.GetValueForProperty("GmsaProfileRootDomainName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).GmsaProfileRootDomainName, global::System.Convert.ToString); } + if (content.Contains("OverrideSettingForceUpgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).OverrideSettingForceUpgrade = (bool?) content.GetValueForProperty("OverrideSettingForceUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).OverrideSettingForceUpgrade, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("OverrideSettingUntil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).OverrideSettingUntil = (global::System.DateTime?) content.GetValueForProperty("OverrideSettingUntil",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).OverrideSettingUntil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } if (content.Contains("DefenderSecurityMonitoring")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).DefenderSecurityMonitoring = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderSecurityMonitoring) content.GetValueForProperty("DefenderSecurityMonitoring",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).DefenderSecurityMonitoring, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter.ConvertFrom); @@ -653,10 +801,30 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BlobCsiDriverEnabled = (bool?) content.GetValueForProperty("BlobCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BlobCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("WebAppRoutingNginx")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingNginx = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx) content.GetValueForProperty("WebAppRoutingNginx",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingNginx, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileNginxTypeConverter.ConvertFrom); + } + if (content.Contains("WebAppRoutingIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity) content.GetValueForProperty("WebAppRoutingIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UserAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("WebAppRoutingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingEnabled = (bool?) content.GetValueForProperty("WebAppRoutingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("WebAppRoutingDnsZoneResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingDnsZoneResourceId = (System.Collections.Generic.List) content.GetValueForProperty("WebAppRoutingDnsZoneResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingDnsZoneResourceId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } if (content.Contains("KedaEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).KedaEnabled = (bool?) content.GetValueForProperty("KedaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).KedaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("VerticalPodAutoscalerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).VerticalPodAutoscalerEnabled = (bool?) content.GetValueForProperty("VerticalPodAutoscalerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).VerticalPodAutoscalerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("MetricKubeStateMetric")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricKubeStateMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileKubeStateMetrics) content.GetValueForProperty("MetricKubeStateMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricKubeStateMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter.ConvertFrom); @@ -665,10 +833,62 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricEnabled = (bool?) content.GetValueForProperty("MetricEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("IstioRevision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IstioRevision = (System.Collections.Generic.List) content.GetValueForProperty("IstioRevision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IstioRevision, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ComponentIngressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ComponentIngressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentIngressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ComponentIngressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioIngressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("ComponentEgressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ComponentEgressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentEgressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ComponentEgressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioEgressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("CostAnalysisEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).CostAnalysisEnabled = (bool?) content.GetValueForProperty("CostAnalysisEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).CostAnalysisEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorCode = (string) content.GetValueForProperty("ProvisioningErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorMessage = (string) content.GetValueForProperty("ProvisioningErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorTarget = (string) content.GetValueForProperty("ProvisioningErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorTarget, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorDetail = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } if (content.Contains("SecurityMonitoringEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SecurityMonitoringEnabled = (bool?) content.GetValueForProperty("SecurityMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SecurityMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("NginxDefaultIngressControllerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NginxDefaultIngressControllerType = (string) content.GetValueForProperty("NginxDefaultIngressControllerType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NginxDefaultIngressControllerType, global::System.Convert.ToString); + } + if (content.Contains("IdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityResourceId, global::System.Convert.ToString); + } + if (content.Contains("IdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityClientId = (string) content.GetValueForProperty("IdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityClientId, global::System.Convert.ToString); + } + if (content.Contains("IdentityObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityObjectId = (string) content.GetValueForProperty("IdentityObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityObjectId, global::System.Convert.ToString); + } if (content.Contains("KubeStateMetricLabelsAllowlist")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).KubeStateMetricLabelsAllowlist = (string) content.GetValueForProperty("KubeStateMetricLabelsAllowlist",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).KubeStateMetricLabelsAllowlist, global::System.Convert.ToString); @@ -677,6 +897,30 @@ internal ManagedCluster(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).KubeStateMetricAnnotationsAllowList = (string) content.GetValueForProperty("KubeStateMetricAnnotationsAllowList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).KubeStateMetricAnnotationsAllowList, global::System.Convert.ToString); } + if (content.Contains("CertificateAuthorityPlugin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).CertificateAuthorityPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority) content.GetValueForProperty("CertificateAuthorityPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).CertificateAuthorityPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("PluginKeyVaultId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginKeyVaultId = (string) content.GetValueForProperty("PluginKeyVaultId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginKeyVaultId, global::System.Convert.ToString); + } + if (content.Contains("PluginCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginCertObjectName = (string) content.GetValueForProperty("PluginCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginKeyObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginKeyObjectName = (string) content.GetValueForProperty("PluginKeyObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginKeyObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginRootCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginRootCertObjectName = (string) content.GetValueForProperty("PluginRootCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginRootCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginCertChainObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginCertChainObjectName = (string) content.GetValueForProperty("PluginCertChainObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginCertChainObjectName, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -710,6 +954,14 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPropertiesTypeConverter.ConvertFrom); } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ETag, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).Kind, global::System.Convert.ToString); + } if (content.Contains("SystemDataCreatedBy")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); @@ -762,6 +1014,10 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ExtendedLocationName = (string) content.GetValueForProperty("ExtendedLocationName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ExtendedLocationName, global::System.Convert.ToString); } + if (content.Contains("IdentityDelegatedResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityDelegatedResource = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources) content.GetValueForProperty("IdentityDelegatedResource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityDelegatedResource, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DelegatedResourcesTypeConverter.ConvertFrom); + } if (content.Contains("PowerState")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PowerStateTypeConverter.ConvertFrom); @@ -814,6 +1070,10 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterOidcIssuerProfileTypeConverter.ConvertFrom); } + if (content.Contains("NodeResourceGroupProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeResourceGroupProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile) content.GetValueForProperty("NodeResourceGroupProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeResourceGroupProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeResourceGroupProfileTypeConverter.ConvertFrom); + } if (content.Contains("AadProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAadProfileTypeConverter.ConvertFrom); @@ -822,6 +1082,10 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoUpgradeProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfile) content.GetValueForProperty("AutoUpgradeProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoUpgradeProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAutoUpgradeProfileTypeConverter.ConvertFrom); } + if (content.Contains("UpgradeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ClusterUpgradeSettingsTypeConverter.ConvertFrom); + } if (content.Contains("AutoScalerProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfile) content.GetValueForProperty("AutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPropertiesAutoScalerProfileTypeConverter.ConvertFrom); @@ -842,6 +1106,10 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileTypeConverter.ConvertFrom); } + if (content.Contains("IngressProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IngressProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile) content.GetValueForProperty("IngressProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IngressProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileTypeConverter.ConvertFrom); + } if (content.Contains("WorkloadAutoScalerProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WorkloadAutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfile) content.GetValueForProperty("WorkloadAutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WorkloadAutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileTypeConverter.ConvertFrom); @@ -850,6 +1118,30 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AzureMonitorProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfile) content.GetValueForProperty("AzureMonitorProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AzureMonitorProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfileTypeConverter.ConvertFrom); } + if (content.Contains("ServiceMeshProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ServiceMeshProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile) content.GetValueForProperty("ServiceMeshProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ServiceMeshProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ServiceMeshProfileTypeConverter.ConvertFrom); + } + if (content.Contains("MetricsProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile) content.GetValueForProperty("MetricsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterMetricsProfileTypeConverter.ConvertFrom); + } + if (content.Contains("NodeProvisioningProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeProvisioningProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile) content.GetValueForProperty("NodeProvisioningProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeProvisioningProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeProvisioningProfileTypeConverter.ConvertFrom); + } + if (content.Contains("BootstrapProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BootstrapProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile) content.GetValueForProperty("BootstrapProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BootstrapProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterBootstrapProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AiToolchainOperatorProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AiToolchainOperatorProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile) content.GetValueForProperty("AiToolchainOperatorProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AiToolchainOperatorProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAiToolchainOperatorProfileTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStatusTypeConverter.ConvertFrom); + } if (content.Contains("ProvisioningState")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningState, global::System.Convert.ToString); @@ -902,9 +1194,9 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).EnableRbac = (bool?) content.GetValueForProperty("EnableRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).EnableRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("EnablePodSecurityPolicy")) + if (content.Contains("SupportPlan")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).EnablePodSecurityPolicy = (bool?) content.GetValueForProperty("EnablePodSecurityPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).EnablePodSecurityPolicy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SupportPlan = (string) content.GetValueForProperty("SupportPlan",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SupportPlan, global::System.Convert.ToString); } if (content.Contains("DiskEncryptionSetId")) { @@ -926,6 +1218,10 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PublicNetworkAccess, global::System.Convert.ToString); } + if (content.Contains("ResourceUid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ResourceUid = (string) content.GetValueForProperty("ResourceUid",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ResourceUid, global::System.Convert.ToString); + } if (content.Contains("NetworkProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceNetworkProfileTypeConverter.ConvertFrom); @@ -938,6 +1234,10 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WindowProfileLicenseType = (string) content.GetValueForProperty("WindowProfileLicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WindowProfileLicenseType, global::System.Convert.ToString); } + if (content.Contains("NodeResourceGroupProfileRestrictionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeResourceGroupProfileRestrictionLevel = (string) content.GetValueForProperty("NodeResourceGroupProfileRestrictionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeResourceGroupProfileRestrictionLevel, global::System.Convert.ToString); + } if (content.Contains("AutoUpgradeProfileUpgradeChannel")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoUpgradeProfileUpgradeChannel = (string) content.GetValueForProperty("AutoUpgradeProfileUpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoUpgradeProfileUpgradeChannel, global::System.Convert.ToString); @@ -946,6 +1246,10 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileExpander = (string) content.GetValueForProperty("AutoScalerProfileExpander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileExpander, global::System.Convert.ToString); } + if (content.Contains("BootstrapProfileArtifactSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BootstrapProfileArtifactSource = (string) content.GetValueForProperty("BootstrapProfileArtifactSource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BootstrapProfileArtifactSource, global::System.Convert.ToString); + } if (content.Contains("LinuxProfileSsh")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).LinuxProfileSsh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceSshConfiguration) content.GetValueForProperty("LinuxProfileSsh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).LinuxProfileSsh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); @@ -1030,10 +1334,30 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AadProfileTenantId, global::System.Convert.ToString); } + if (content.Contains("AutoUpgradeProfileNodeOSUpgradeChannel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoUpgradeProfileNodeOSUpgradeChannel = (string) content.GetValueForProperty("AutoUpgradeProfileNodeOSUpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoUpgradeProfileNodeOSUpgradeChannel, global::System.Convert.ToString); + } + if (content.Contains("UpgradeSettingOverrideSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).UpgradeSettingOverrideSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings) content.GetValueForProperty("UpgradeSettingOverrideSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).UpgradeSettingOverrideSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UpgradeOverrideSettingsTypeConverter.ConvertFrom); + } if (content.Contains("AutoScalerProfileBalanceSimilarNodeGroup")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup = (string) content.GetValueForProperty("AutoScalerProfileBalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup, global::System.Convert.ToString); } + if (content.Contains("AutoScalerProfileDaemonsetEvictionForEmptyNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileDaemonsetEvictionForEmptyNode = (bool?) content.GetValueForProperty("AutoScalerProfileDaemonsetEvictionForEmptyNode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileDaemonsetEvictionForEmptyNode, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoScalerProfileDaemonsetEvictionForOccupiedNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileDaemonsetEvictionForOccupiedNode = (bool?) content.GetValueForProperty("AutoScalerProfileDaemonsetEvictionForOccupiedNode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileDaemonsetEvictionForOccupiedNode, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoScalerProfileIgnoreDaemonsetsUtilization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileIgnoreDaemonsetsUtilization = (bool?) content.GetValueForProperty("AutoScalerProfileIgnoreDaemonsetsUtilization",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileIgnoreDaemonsetsUtilization, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("AutoScalerProfileMaxEmptyBulkDelete")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete = (string) content.GetValueForProperty("AutoScalerProfileMaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete, global::System.Convert.ToString); @@ -1114,6 +1438,14 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ApiServerAccessProfileDisableRunCommand = (bool?) content.GetValueForProperty("ApiServerAccessProfileDisableRunCommand",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ApiServerAccessProfileDisableRunCommand, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("ApiServerAccessProfileEnableVnetIntegration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ApiServerAccessProfileEnableVnetIntegration = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnableVnetIntegration",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ApiServerAccessProfileEnableVnetIntegration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApiServerAccessProfileSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ApiServerAccessProfileSubnetId = (string) content.GetValueForProperty("ApiServerAccessProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ApiServerAccessProfileSubnetId, global::System.Convert.ToString); + } if (content.Contains("HttpProxyConfigHttpProxy")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).HttpProxyConfigHttpProxy = (string) content.GetValueForProperty("HttpProxyConfigHttpProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).HttpProxyConfigHttpProxy, global::System.Convert.ToString); @@ -1146,6 +1478,10 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SecurityProfileImageCleaner = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileImageCleaner) content.GetValueForProperty("SecurityProfileImageCleaner",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SecurityProfileImageCleaner, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfileImageCleanerTypeConverter.ConvertFrom); } + if (content.Contains("SecurityProfileCustomCaTrustCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SecurityProfileCustomCaTrustCertificate = (System.Collections.Generic.List) content.GetValueForProperty("SecurityProfileCustomCaTrustCertificate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SecurityProfileCustomCaTrustCertificate, __y => TypeConverterExtensions.SelectToList(__y, i => i)); + } if (content.Contains("AzureKeyVaultKmKeyId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AzureKeyVaultKmKeyId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AzureKeyVaultKmKeyId, global::System.Convert.ToString); @@ -1166,14 +1502,62 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).StorageProfileBlobCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileBlobCsiDriver) content.GetValueForProperty("StorageProfileBlobCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).StorageProfileBlobCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileBlobCsiDriverTypeConverter.ConvertFrom); } + if (content.Contains("IngressProfileWebAppRouting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IngressProfileWebAppRouting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting) content.GetValueForProperty("IngressProfileWebAppRouting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IngressProfileWebAppRouting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileWebAppRoutingTypeConverter.ConvertFrom); + } if (content.Contains("WorkloadAutoScalerProfileKeda")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WorkloadAutoScalerProfileKeda = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileKeda) content.GetValueForProperty("WorkloadAutoScalerProfileKeda",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WorkloadAutoScalerProfileKeda, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter.ConvertFrom); } + if (content.Contains("WorkloadAutoScalerProfileVerticalPodAutoscaler")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WorkloadAutoScalerProfileVerticalPodAutoscaler = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) content.GetValueForProperty("WorkloadAutoScalerProfileVerticalPodAutoscaler",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WorkloadAutoScalerProfileVerticalPodAutoscaler, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerTypeConverter.ConvertFrom); + } if (content.Contains("AzureMonitorProfileMetric")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AzureMonitorProfileMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetrics) content.GetValueForProperty("AzureMonitorProfileMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AzureMonitorProfileMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfileMetricsTypeConverter.ConvertFrom); } + if (content.Contains("ServiceMeshProfileIstio")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ServiceMeshProfileIstio = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh) content.GetValueForProperty("ServiceMeshProfileIstio",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ServiceMeshProfileIstio, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioServiceMeshTypeConverter.ConvertFrom); + } + if (content.Contains("ServiceMeshProfileMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ServiceMeshProfileMode = (string) content.GetValueForProperty("ServiceMeshProfileMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ServiceMeshProfileMode, global::System.Convert.ToString); + } + if (content.Contains("IstioComponent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IstioComponent = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents) content.GetValueForProperty("IstioComponent",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IstioComponent, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioComponentsTypeConverter.ConvertFrom); + } + if (content.Contains("IstioCertificateAuthority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IstioCertificateAuthority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority) content.GetValueForProperty("IstioCertificateAuthority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IstioCertificateAuthority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("MetricProfileCostAnalysis")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricProfileCostAnalysis = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis) content.GetValueForProperty("MetricProfileCostAnalysis",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricProfileCostAnalysis, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterCostAnalysisTypeConverter.ConvertFrom); + } + if (content.Contains("NodeProvisioningProfileMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeProvisioningProfileMode = (string) content.GetValueForProperty("NodeProvisioningProfileMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeProvisioningProfileMode, global::System.Convert.ToString); + } + if (content.Contains("NodeProvisioningProfileDefaultNodePool")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeProvisioningProfileDefaultNodePool = (string) content.GetValueForProperty("NodeProvisioningProfileDefaultNodePool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NodeProvisioningProfileDefaultNodePool, global::System.Convert.ToString); + } + if (content.Contains("BootstrapProfileContainerRegistryId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BootstrapProfileContainerRegistryId = (string) content.GetValueForProperty("BootstrapProfileContainerRegistryId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BootstrapProfileContainerRegistryId, global::System.Convert.ToString); + } + if (content.Contains("AiToolchainOperatorProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AiToolchainOperatorProfileEnabled = (bool?) content.GetValueForProperty("AiToolchainOperatorProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).AiToolchainOperatorProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("StatusProvisioningError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).StatusProvisioningError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("StatusProvisioningError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).StatusProvisioningError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } if (content.Contains("SshPublicKey")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SshPublicKey = (System.Collections.Generic.List) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); @@ -1190,6 +1574,14 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).GmsaProfileRootDomainName = (string) content.GetValueForProperty("GmsaProfileRootDomainName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).GmsaProfileRootDomainName, global::System.Convert.ToString); } + if (content.Contains("OverrideSettingForceUpgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).OverrideSettingForceUpgrade = (bool?) content.GetValueForProperty("OverrideSettingForceUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).OverrideSettingForceUpgrade, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("OverrideSettingUntil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).OverrideSettingUntil = (global::System.DateTime?) content.GetValueForProperty("OverrideSettingUntil",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).OverrideSettingUntil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } if (content.Contains("DefenderSecurityMonitoring")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).DefenderSecurityMonitoring = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderSecurityMonitoring) content.GetValueForProperty("DefenderSecurityMonitoring",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).DefenderSecurityMonitoring, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter.ConvertFrom); @@ -1238,10 +1630,30 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BlobCsiDriverEnabled = (bool?) content.GetValueForProperty("BlobCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).BlobCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("WebAppRoutingNginx")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingNginx = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx) content.GetValueForProperty("WebAppRoutingNginx",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingNginx, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileNginxTypeConverter.ConvertFrom); + } + if (content.Contains("WebAppRoutingIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity) content.GetValueForProperty("WebAppRoutingIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UserAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("WebAppRoutingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingEnabled = (bool?) content.GetValueForProperty("WebAppRoutingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("WebAppRoutingDnsZoneResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingDnsZoneResourceId = (System.Collections.Generic.List) content.GetValueForProperty("WebAppRoutingDnsZoneResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).WebAppRoutingDnsZoneResourceId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } if (content.Contains("KedaEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).KedaEnabled = (bool?) content.GetValueForProperty("KedaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).KedaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("VerticalPodAutoscalerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).VerticalPodAutoscalerEnabled = (bool?) content.GetValueForProperty("VerticalPodAutoscalerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).VerticalPodAutoscalerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("MetricKubeStateMetric")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricKubeStateMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileKubeStateMetrics) content.GetValueForProperty("MetricKubeStateMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricKubeStateMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter.ConvertFrom); @@ -1250,10 +1662,62 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricEnabled = (bool?) content.GetValueForProperty("MetricEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).MetricEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("IstioRevision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IstioRevision = (System.Collections.Generic.List) content.GetValueForProperty("IstioRevision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IstioRevision, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ComponentIngressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ComponentIngressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentIngressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ComponentIngressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioIngressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("ComponentEgressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ComponentEgressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentEgressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ComponentEgressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioEgressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("CostAnalysisEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).CostAnalysisEnabled = (bool?) content.GetValueForProperty("CostAnalysisEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).CostAnalysisEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorCode = (string) content.GetValueForProperty("ProvisioningErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorMessage = (string) content.GetValueForProperty("ProvisioningErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorTarget = (string) content.GetValueForProperty("ProvisioningErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorTarget, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorDetail = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).ProvisioningErrorAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } if (content.Contains("SecurityMonitoringEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SecurityMonitoringEnabled = (bool?) content.GetValueForProperty("SecurityMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).SecurityMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("NginxDefaultIngressControllerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NginxDefaultIngressControllerType = (string) content.GetValueForProperty("NginxDefaultIngressControllerType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).NginxDefaultIngressControllerType, global::System.Convert.ToString); + } + if (content.Contains("IdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityResourceId, global::System.Convert.ToString); + } + if (content.Contains("IdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityClientId = (string) content.GetValueForProperty("IdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityClientId, global::System.Convert.ToString); + } + if (content.Contains("IdentityObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityObjectId = (string) content.GetValueForProperty("IdentityObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).IdentityObjectId, global::System.Convert.ToString); + } if (content.Contains("KubeStateMetricLabelsAllowlist")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).KubeStateMetricLabelsAllowlist = (string) content.GetValueForProperty("KubeStateMetricLabelsAllowlist",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).KubeStateMetricLabelsAllowlist, global::System.Convert.ToString); @@ -1262,6 +1726,30 @@ internal ManagedCluster(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).KubeStateMetricAnnotationsAllowList = (string) content.GetValueForProperty("KubeStateMetricAnnotationsAllowList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).KubeStateMetricAnnotationsAllowList, global::System.Convert.ToString); } + if (content.Contains("CertificateAuthorityPlugin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).CertificateAuthorityPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority) content.GetValueForProperty("CertificateAuthorityPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).CertificateAuthorityPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("PluginKeyVaultId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginKeyVaultId = (string) content.GetValueForProperty("PluginKeyVaultId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginKeyVaultId, global::System.Convert.ToString); + } + if (content.Contains("PluginCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginCertObjectName = (string) content.GetValueForProperty("PluginCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginKeyObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginKeyObjectName = (string) content.GetValueForProperty("PluginKeyObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginKeyObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginRootCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginRootCertObjectName = (string) content.GetValueForProperty("PluginRootCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginRootCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginCertChainObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginCertChainObjectName = (string) content.GetValueForProperty("PluginCertChainObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal)this).PluginCertChainObjectName, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedCluster.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedCluster.cs index 3824aab6e4c7..c49c7619cdd8 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedCluster.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedCluster.cs @@ -63,9 +63,15 @@ public partial class ManagedCluster : public System.Collections.Generic.List AgentPoolProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AgentPoolProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AgentPoolProfile = value ?? null /* arrayOf */; } /// - /// IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use - /// Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized - /// IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + /// Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain operator enabled or not. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AiToolchainOperatorProfileEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AiToolchainOperatorProfileEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AiToolchainOperatorProfileEnabled = value ?? default(bool); } + + /// + /// The IP ranges authorized to access the Kubernetes API server. IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + /// This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. + /// For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public System.Collections.Generic.List ApiServerAccessProfileAuthorizedIPRange { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileAuthorizedIPRange; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileAuthorizedIPRange = value ?? null /* arrayOf */; } @@ -75,7 +81,7 @@ public partial class ManagedCluster : public bool? ApiServerAccessProfileDisableRunCommand { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileDisableRunCommand; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileDisableRunCommand = value ?? default(bool); } /// - /// For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). + /// Whether to create the cluster as a private cluster or not. For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? ApiServerAccessProfileEnablePrivateCluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileEnablePrivateCluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileEnablePrivateCluster = value ?? default(bool); } @@ -85,102 +91,176 @@ public partial class ManagedCluster : public bool? ApiServerAccessProfileEnablePrivateClusterPublicFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileEnablePrivateClusterPublicFqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileEnablePrivateClusterPublicFqdn = value ?? default(bool); } /// - /// The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). + /// Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? ApiServerAccessProfileEnableVnetIntegration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileEnableVnetIntegration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileEnableVnetIntegration = value ?? default(bool); } + + /// + /// The private DNS zone mode for the cluster. The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). /// Allowed values are 'system' and 'none'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string ApiServerAccessProfilePrivateDnsZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfilePrivateDnsZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfilePrivateDnsZone = value ?? null; } - /// Valid values are 'true' and 'false' + /// + /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with BYO + /// Vnet, or when updating an existing cluster to enable apiserver vnet integration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ApiServerAccessProfileSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileSubnetId = value ?? null; } + + /// + /// Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false' + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileBalanceSimilarNodeGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileBalanceSimilarNodeGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileBalanceSimilarNodeGroup = value ?? null; } /// - /// If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + /// DaemonSet pods will be gracefully terminated from empty nodes. If set to true, all daemonset pods on empty nodes will + /// be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AutoScalerProfileDaemonsetEvictionForEmptyNode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileDaemonsetEvictionForEmptyNode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileDaemonsetEvictionForEmptyNode = value ?? default(bool); } + + /// + /// DaemonSet pods will be gracefully terminated from non-empty nodes. If set to true, all daemonset pods on occupied nodes + /// will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AutoScalerProfileDaemonsetEvictionForOccupiedNode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileDaemonsetEvictionForOccupiedNode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileDaemonsetEvictionForOccupiedNode = value ?? default(bool); } + + /// + /// The expander to use when scaling up. If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) /// for more information. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileExpander { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileExpander; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileExpander = value ?? null; } - /// The default is 10. + /// + /// Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the resources + /// used by daemonset will be taken into account when making scaling down decisions. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AutoScalerProfileIgnoreDaemonsetsUtilization { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileIgnoreDaemonsetsUtilization; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileIgnoreDaemonsetsUtilization = value ?? default(bool); } + + /// + /// The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is + /// 10. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileMaxEmptyBulkDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxEmptyBulkDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxEmptyBulkDelete = value ?? null; } - /// The default is 600. + /// + /// The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. The default + /// is 600. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileMaxGracefulTerminationSec { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxGracefulTerminationSec; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxGracefulTerminationSec = value ?? null; } /// - /// The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileMaxNodeProvisionTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxNodeProvisionTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxNodeProvisionTime = value ?? null; } - /// The default is 45. The maximum is 100 and the minimum is 0. + /// + /// The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler halts operations. + /// The default is 45. The maximum is 100 and the minimum is 0. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileMaxTotalUnreadyPercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxTotalUnreadyPercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxTotalUnreadyPercentage = value ?? null; } /// - /// For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all - /// the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be - /// an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + /// Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want CA to + /// act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're + /// a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' + /// for hours, etc). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileNewPodScaleUpDelay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileNewPodScaleUpDelay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileNewPodScaleUpDelay = value ?? null; } - /// This must be an integer. The default is 3. + /// + /// The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default + /// is 3. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileOkTotalUnreadyCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileOkTotalUnreadyCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileOkTotalUnreadyCount = value ?? null; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer followed by + /// an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileScaleDownDelayAfterAdd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterAdd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterAdd = value ?? null; } /// - /// The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) - /// is supported. + /// How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileScaleDownDelayAfterDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterDelete = value ?? null; } /// - /// The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileScaleDownDelayAfterFailure { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterFailure; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterFailure = value ?? null; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileScaleDownUnneededTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUnneededTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUnneededTime = value ?? null; } /// - /// The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long an unready node should be unneeded before it is eligible for scale down. The default is '20m'. Values must be + /// an integer followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileScaleDownUnreadyTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUnreadyTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUnreadyTime = value ?? null; } - /// The default is '0.5'. + /// + /// Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered + /// for scale down. The default is '0.5'. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileScaleDownUtilizationThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUtilizationThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUtilizationThreshold = value ?? null; } - /// The default is '10'. Values must be an integer number of seconds. + /// + /// How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileScanInterval { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScanInterval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScanInterval = value ?? null; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. The default + /// is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileSkipNodesWithLocalStorage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileSkipNodesWithLocalStorage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileSkipNodesWithLocalStorage = value ?? null; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods). The default + /// is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileSkipNodesWithSystemPod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileSkipNodesWithSystemPod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfileSkipNodesWithSystemPod = value ?? null; } /// - /// For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + /// Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoUpgradeProfileNodeOSUpgradeChannel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoUpgradeProfileNodeOSUpgradeChannel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoUpgradeProfileNodeOSUpgradeChannel = value ?? null; } + + /// + /// The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster auto-upgrade + /// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoUpgradeProfileUpgradeChannel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoUpgradeProfileUpgradeChannel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoUpgradeProfileUpgradeChannel = value ?? null; } @@ -198,9 +278,9 @@ public partial class ManagedCluster : public string AzureKeyVaultKmKeyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzureKeyVaultKmKeyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzureKeyVaultKmKeyId = value ?? null; } /// - /// Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public - /// access from all networks. `Private` means the key vault disables public access and enables private link. The default value - /// is `Public`. + /// Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` + /// means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables + /// private link. The default value is `Public`. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AzureKeyVaultKmKeyVaultNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzureKeyVaultKmKeyVaultNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzureKeyVaultKmKeyVaultNetworkAccess = value ?? null; } @@ -213,8 +293,10 @@ public partial class ManagedCluster : public string AzureKeyVaultKmKeyVaultResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzureKeyVaultKmKeyVaultResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzureKeyVaultKmKeyVaultResourceId = value ?? null; } /// - /// 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. + /// 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. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AzurePortalFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzurePortalFqdn; } @@ -223,9 +305,36 @@ public partial class ManagedCluster : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? BlobCsiDriverEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).BlobCsiDriverEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).BlobCsiDriverEnabled = value ?? default(bool); } + /// The artifact source. The source where the artifacts are downloaded from. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string BootstrapProfileArtifactSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).BootstrapProfileArtifactSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).BootstrapProfileArtifactSource = value ?? null; } + /// - /// If kubernetesVersion was a fully specified version , this field will be exactly equal to it. If kubernetesVersion - /// was , this field will contain the full version being used. + /// The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string BootstrapProfileContainerRegistryId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).BootstrapProfileContainerRegistryId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).BootstrapProfileContainerRegistryId = value ?? null; } + + /// Istio egress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ComponentEgressGateway { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ComponentEgressGateway; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ComponentEgressGateway = value ?? null /* arrayOf */; } + + /// Istio ingress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ComponentIngressGateway { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ComponentIngressGateway; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ComponentIngressGateway = value ?? null /* arrayOf */; } + + /// + /// Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. + /// Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If + /// not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? CostAnalysisEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).CostAnalysisEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).CostAnalysisEnabled = value ?? default(bool); } + + /// + /// The version of Kubernetes the Managed Cluster is running. If kubernetesVersion was a fully specified version , + /// this field will be exactly equal to it. If kubernetesVersion was , this field will contain the full + /// version being used. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string CurrentKubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).CurrentKubernetesVersion; } @@ -239,8 +348,9 @@ public partial class ManagedCluster : public string DefenderLogAnalyticsWorkspaceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).DefenderLogAnalyticsWorkspaceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).DefenderLogAnalyticsWorkspaceResourceId = value ?? null; } /// - /// If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters - /// that are AAD enabled. For more details see [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + /// If local accounts should be disabled on the Managed Cluster. If set to true, getting static credentials will be disabled + /// for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see [disable local + /// accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? DisableLocalAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).DisableLocalAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).DisableLocalAccount = value ?? default(bool); } @@ -250,21 +360,27 @@ public partial class ManagedCluster : public bool? DiskCsiDriverEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).DiskCsiDriverEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).DiskCsiDriverEnabled = value ?? default(bool); } /// - /// This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' + /// The Resource ID of the disk encryption set to use for enabling encryption at rest. This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string DiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).DiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).DiskEncryptionSetId = value ?? null; } - /// This cannot be updated once the Managed Cluster has been created. + /// + /// The DNS prefix of the Managed Cluster. This cannot be updated once the Managed Cluster has been created. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string DnsPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).DnsPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).DnsPrefix = value ?? null; } + /// Backing field for property. + private string _eTag; + /// - /// (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes - /// v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + /// 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. /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public bool? EnablePodSecurityPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).EnablePodSecurityPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).EnablePodSecurityPolicy = value ?? default(bool); } + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ETag { get => this._eTag; } /// Whether to enable Kubernetes Role-Based Access Control. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] @@ -293,7 +409,10 @@ public partial class ManagedCluster : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string Fqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).Fqdn; } - /// This cannot be updated once the Managed Cluster has been created. + /// + /// The FQDN subdomain of the private cluster with custom private dns zone. This cannot be updated once the Managed Cluster + /// has been created. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string FqdnSubdomain { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).FqdnSubdomain; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).FqdnSubdomain = value ?? null; } @@ -304,7 +423,9 @@ public partial class ManagedCluster : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string GmsaProfileDnsServer { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).GmsaProfileDnsServer; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).GmsaProfileDnsServer = value ?? null; } - /// Specifies whether to enable Windows gMSA in the managed cluster. + /// + /// Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? GmsaProfileEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).GmsaProfileEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).GmsaProfileEnabled = value ?? default(bool); } @@ -332,7 +453,7 @@ public partial class ManagedCluster : public string HttpProxyConfigTrustedCa { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).HttpProxyConfigTrustedCa; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).HttpProxyConfigTrustedCa = value ?? null; } /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id; } @@ -344,16 +465,38 @@ public partial class ManagedCluster : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIdentity()); set => this._identity = value; } + /// The client ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string IdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IdentityClientId; } + + /// + /// The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource Provider, + /// and managed cluster only accept one delegated identity resource. Internal use only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources IdentityDelegatedResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).DelegatedResource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).DelegatedResource = value ?? null /* model class */; } + + /// The object ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string IdentityObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IdentityObjectId; } + /// /// The principal id of the system assigned identity which is used by master components. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).PrincipalId; } - /// Identities associated with the cluster. + /// + /// The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned + /// identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesIdentityProfile IdentityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IdentityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IdentityProfile = value ?? null /* model class */; } + /// The resource ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string IdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IdentityResourceId; } + /// /// The tenant id of the system assigned identity which is used by master components. /// @@ -361,13 +504,14 @@ public partial class ManagedCluster : public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).TenantId; } /// - /// For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + /// The type of identity used for the managed cluster. For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).Type = value ?? null; } /// - /// The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The user identity associated with the managed cluster. This identity will be used in control plane. Only one user assigned + /// identity is allowed. The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } @@ -380,10 +524,26 @@ public partial class ManagedCluster : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public int? ImageCleanerIntervalHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ImageCleanerIntervalHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ImageCleanerIntervalHour = value ?? default(int); } + /// + /// The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary + /// upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List IstioRevision { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IstioRevision; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IstioRevision = value ?? null /* arrayOf */; } + /// Whether to enable KEDA. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? KedaEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).KedaEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).KedaEnabled = value ?? default(bool); } + /// Backing field for property. + private string _kind; + + /// + /// This is primarily used to expose different UI experiences in the portal for different kinds + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Kind { get => this._kind; set => this._kind = value; } + /// /// Comma-separated list of Kubernetes annotation keys that will be used in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). /// By default the metric contains only resource name and namespace labels. @@ -399,12 +559,12 @@ public partial class ManagedCluster : public string KubeStateMetricLabelsAllowlist { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).KubeStateMetricLabelsAllowlist; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).KubeStateMetricLabelsAllowlist = value ?? null; } /// - /// Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When - /// is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same - /// once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. - /// When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed - /// sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, - /// however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) + /// The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + /// (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. + /// Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, + /// even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot + /// be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x + /// -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) /// for more details. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] @@ -430,163 +590,253 @@ public partial class ManagedCluster : public bool? MetricEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).MetricEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).MetricEnabled = value ?? default(bool); } /// Internal Acessors for AadProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAadProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.AadProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AadProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AadProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAadProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.AadProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AadProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AadProfile = value ?? null /* model class */; } + + /// Internal Acessors for AiToolchainOperatorProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.AiToolchainOperatorProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AiToolchainOperatorProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AiToolchainOperatorProfile = value ?? null /* model class */; } /// Internal Acessors for ApiServerAccessProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ApiServerAccessProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ApiServerAccessProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfile = value ?? null /* model class */; } /// Internal Acessors for AutoScalerProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.AutoScalerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.AutoScalerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoScalerProfile = value ?? null /* model class */; } /// Internal Acessors for AutoUpgradeProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.AutoUpgradeProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoUpgradeProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoUpgradeProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.AutoUpgradeProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoUpgradeProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AutoUpgradeProfile = value ?? null /* model class */; } /// Internal Acessors for AzureMonitorProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.AzureMonitorProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzureMonitorProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzureMonitorProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.AzureMonitorProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzureMonitorProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzureMonitorProfile = value ?? null /* model class */; } /// Internal Acessors for AzureMonitorProfileMetric - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.AzureMonitorProfileMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzureMonitorProfileMetric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzureMonitorProfileMetric = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.AzureMonitorProfileMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzureMonitorProfileMetric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzureMonitorProfileMetric = value ?? null /* model class */; } /// Internal Acessors for AzurePortalFqdn - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.AzurePortalFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzurePortalFqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzurePortalFqdn = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.AzurePortalFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzurePortalFqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).AzurePortalFqdn = value ?? null; } + + /// Internal Acessors for BootstrapProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.BootstrapProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).BootstrapProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).BootstrapProfile = value ?? null /* model class */; } + + /// Internal Acessors for CertificateAuthorityPlugin + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.CertificateAuthorityPlugin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).CertificateAuthorityPlugin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).CertificateAuthorityPlugin = value ?? null /* model class */; } /// Internal Acessors for CurrentKubernetesVersion - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.CurrentKubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).CurrentKubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).CurrentKubernetesVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.CurrentKubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).CurrentKubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).CurrentKubernetesVersion = value ?? null; } /// Internal Acessors for DefenderSecurityMonitoring - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderSecurityMonitoring Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.DefenderSecurityMonitoring { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).DefenderSecurityMonitoring; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).DefenderSecurityMonitoring = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderSecurityMonitoring Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.DefenderSecurityMonitoring { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).DefenderSecurityMonitoring; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).DefenderSecurityMonitoring = value ?? null /* model class */; } + + /// Internal Acessors for ETag + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ETag { get => this._eTag; set { {_eTag = value;} } } /// Internal Acessors for ExtendedLocation Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IExtendedLocation Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ExtendedLocation { get => (this._extendedLocation = this._extendedLocation ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ExtendedLocation()); set { {_extendedLocation = value;} } } /// Internal Acessors for Fqdn - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.Fqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).Fqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).Fqdn = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.Fqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).Fqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).Fqdn = value ?? null; } /// Internal Acessors for HttpProxyConfig - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterHttpProxyConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.HttpProxyConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).HttpProxyConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).HttpProxyConfig = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterHttpProxyConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.HttpProxyConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).HttpProxyConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).HttpProxyConfig = value ?? null /* model class */; } /// Internal Acessors for Identity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIdentity()); set { {_identity = value;} } } + /// Internal Acessors for IdentityClientId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.IdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IdentityClientId = value ?? null; } + + /// Internal Acessors for IdentityObjectId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.IdentityObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IdentityObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IdentityObjectId = value ?? null; } + /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).PrincipalId = value ?? null; } + + /// Internal Acessors for IdentityResourceId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.IdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IdentityResourceId = value ?? null; } /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)Identity).TenantId = value ?? null; } + + /// Internal Acessors for IngressProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.IngressProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IngressProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IngressProfile = value ?? null /* model class */; } + + /// Internal Acessors for IngressProfileWebAppRouting + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.IngressProfileWebAppRouting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IngressProfileWebAppRouting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IngressProfileWebAppRouting = value ?? null /* model class */; } + + /// Internal Acessors for IstioCertificateAuthority + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.IstioCertificateAuthority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IstioCertificateAuthority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IstioCertificateAuthority = value ?? null /* model class */; } + + /// Internal Acessors for IstioComponent + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.IstioComponent { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IstioComponent; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).IstioComponent = value ?? null /* model class */; } /// Internal Acessors for LinuxProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceLinuxProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.LinuxProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).LinuxProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).LinuxProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceLinuxProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.LinuxProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).LinuxProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).LinuxProfile = value ?? null /* model class */; } /// Internal Acessors for LinuxProfileSsh - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceSshConfiguration Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.LinuxProfileSsh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).LinuxProfileSsh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).LinuxProfileSsh = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceSshConfiguration Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.LinuxProfileSsh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).LinuxProfileSsh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).LinuxProfileSsh = value ?? null /* model class */; } /// Internal Acessors for MaxAgentPool - int? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.MaxAgentPool { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).MaxAgentPool; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).MaxAgentPool = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.MaxAgentPool { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).MaxAgentPool; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).MaxAgentPool = value ?? default(int); } /// Internal Acessors for MetricKubeStateMetric - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileKubeStateMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.MetricKubeStateMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).MetricKubeStateMetric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).MetricKubeStateMetric = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileKubeStateMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.MetricKubeStateMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).MetricKubeStateMetric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).MetricKubeStateMetric = value ?? null /* model class */; } + + /// Internal Acessors for MetricProfileCostAnalysis + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.MetricProfileCostAnalysis { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).MetricProfileCostAnalysis; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).MetricProfileCostAnalysis = value ?? null /* model class */; } + + /// Internal Acessors for MetricsProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.MetricsProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).MetricsProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).MetricsProfile = value ?? null /* model class */; } + + /// Internal Acessors for NodeProvisioningProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.NodeProvisioningProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NodeProvisioningProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NodeProvisioningProfile = value ?? null /* model class */; } + + /// Internal Acessors for NodeResourceGroupProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.NodeResourceGroupProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NodeResourceGroupProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NodeResourceGroupProfile = value ?? null /* model class */; } /// Internal Acessors for OidcIssuerProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.OidcIssuerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OidcIssuerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OidcIssuerProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.OidcIssuerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OidcIssuerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OidcIssuerProfile = value ?? null /* model class */; } /// Internal Acessors for OidcIssuerProfileIssuerUrl - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OidcIssuerProfileIssuerUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OidcIssuerProfileIssuerUrl = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OidcIssuerProfileIssuerUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OidcIssuerProfileIssuerUrl = value ?? null; } /// Internal Acessors for PodIdentityProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.PodIdentityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PodIdentityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PodIdentityProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.PodIdentityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PodIdentityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PodIdentityProfile = value ?? null /* model class */; } /// Internal Acessors for PowerState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PowerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PowerState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PowerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PowerState = value ?? null /* model class */; } /// Internal Acessors for PowerStateCode - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PowerStateCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PowerStateCode = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PowerStateCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PowerStateCode = value ?? null; } /// Internal Acessors for PrivateFqdn - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.PrivateFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PrivateFqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PrivateFqdn = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.PrivateFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PrivateFqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PrivateFqdn = value ?? null; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterProperties()); set { {_property = value;} } } + /// Internal Acessors for ProvisioningErrorAdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ProvisioningErrorAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorAdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorAdditionalInfo = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningErrorCode + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ProvisioningErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorCode = value ?? null; } + + /// Internal Acessors for ProvisioningErrorDetail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ProvisioningErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorDetail = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningErrorMessage + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ProvisioningErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorMessage = value ?? null; } + + /// Internal Acessors for ProvisioningErrorTarget + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ProvisioningErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorTarget = value ?? null; } + /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for ResourceUid + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ResourceUid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ResourceUid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ResourceUid = value ?? null; } /// Internal Acessors for SecurityProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.SecurityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.SecurityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfile = value ?? null /* model class */; } /// Internal Acessors for SecurityProfileAzureKeyVaultKm - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAzureKeyVaultKms Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.SecurityProfileAzureKeyVaultKm { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileAzureKeyVaultKm; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileAzureKeyVaultKm = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAzureKeyVaultKms Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.SecurityProfileAzureKeyVaultKm { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileAzureKeyVaultKm; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileAzureKeyVaultKm = value ?? null /* model class */; } /// Internal Acessors for SecurityProfileDefender - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefender Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.SecurityProfileDefender { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileDefender; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileDefender = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefender Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.SecurityProfileDefender { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileDefender; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileDefender = value ?? null /* model class */; } /// Internal Acessors for SecurityProfileImageCleaner - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileImageCleaner Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.SecurityProfileImageCleaner { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileImageCleaner; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileImageCleaner = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileImageCleaner Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.SecurityProfileImageCleaner { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileImageCleaner; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileImageCleaner = value ?? null /* model class */; } /// Internal Acessors for SecurityProfileWorkloadIdentity - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileWorkloadIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.SecurityProfileWorkloadIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileWorkloadIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileWorkloadIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileWorkloadIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.SecurityProfileWorkloadIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileWorkloadIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileWorkloadIdentity = value ?? null /* model class */; } + + /// Internal Acessors for ServiceMeshProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ServiceMeshProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ServiceMeshProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ServiceMeshProfile = value ?? null /* model class */; } + + /// Internal Acessors for ServiceMeshProfileIstio + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ServiceMeshProfileIstio { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ServiceMeshProfileIstio; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ServiceMeshProfileIstio = value ?? null /* model class */; } /// Internal Acessors for ServicePrincipalProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterServicePrincipalProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ServicePrincipalProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterServicePrincipalProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.ServicePrincipalProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfile = value ?? null /* model class */; } /// Internal Acessors for Sku Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSku Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSku()); set { {_sku = value;} } } + /// Internal Acessors for Status + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).Status = value ?? null /* model class */; } + + /// Internal Acessors for StatusProvisioningError + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.StatusProvisioningError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StatusProvisioningError; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StatusProvisioningError = value ?? null /* model class */; } + /// Internal Acessors for StorageProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.StorageProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.StorageProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfile = value ?? null /* model class */; } /// Internal Acessors for StorageProfileBlobCsiDriver - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileBlobCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.StorageProfileBlobCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileBlobCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileBlobCsiDriver = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileBlobCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.StorageProfileBlobCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileBlobCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileBlobCsiDriver = value ?? null /* model class */; } /// Internal Acessors for StorageProfileDiskCsiDriver - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileDiskCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.StorageProfileDiskCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileDiskCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileDiskCsiDriver = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileDiskCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.StorageProfileDiskCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileDiskCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileDiskCsiDriver = value ?? null /* model class */; } /// Internal Acessors for StorageProfileFileCsiDriver - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileFileCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.StorageProfileFileCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileFileCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileFileCsiDriver = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileFileCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.StorageProfileFileCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileFileCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileFileCsiDriver = value ?? null /* model class */; } /// Internal Acessors for StorageProfileSnapshotController - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileSnapshotController Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.StorageProfileSnapshotController { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileSnapshotController; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileSnapshotController = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileSnapshotController Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.StorageProfileSnapshotController { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileSnapshotController; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).StorageProfileSnapshotController = value ?? null /* model class */; } + + /// Internal Acessors for UpgradeSetting + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.UpgradeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).UpgradeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).UpgradeSetting = value ?? null /* model class */; } + + /// Internal Acessors for UpgradeSettingOverrideSetting + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.UpgradeSettingOverrideSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).UpgradeSettingOverrideSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).UpgradeSettingOverrideSetting = value ?? null /* model class */; } + + /// Internal Acessors for WebAppRoutingIdentity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.WebAppRoutingIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WebAppRoutingIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WebAppRoutingIdentity = value ?? null /* model class */; } + + /// Internal Acessors for WebAppRoutingNginx + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.WebAppRoutingNginx { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WebAppRoutingNginx; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WebAppRoutingNginx = value ?? null /* model class */; } /// Internal Acessors for WindowProfileGmsaProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWindowsGmsaProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.WindowProfileGmsaProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WindowProfileGmsaProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WindowProfileGmsaProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWindowsGmsaProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.WindowProfileGmsaProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WindowProfileGmsaProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WindowProfileGmsaProfile = value ?? null /* model class */; } /// Internal Acessors for WindowsProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.WindowsProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WindowsProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WindowsProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.WindowsProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WindowsProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WindowsProfile = value ?? null /* model class */; } /// Internal Acessors for WorkloadAutoScalerProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.WorkloadAutoScalerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WorkloadAutoScalerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WorkloadAutoScalerProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.WorkloadAutoScalerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WorkloadAutoScalerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WorkloadAutoScalerProfile = value ?? null /* model class */; } /// Internal Acessors for WorkloadAutoScalerProfileKeda - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileKeda Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.WorkloadAutoScalerProfileKeda { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WorkloadAutoScalerProfileKeda; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WorkloadAutoScalerProfileKeda = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileKeda Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.WorkloadAutoScalerProfileKeda { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WorkloadAutoScalerProfileKeda; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WorkloadAutoScalerProfileKeda = value ?? null /* model class */; } + + /// Internal Acessors for WorkloadAutoScalerProfileVerticalPodAutoscaler + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterInternal.WorkloadAutoScalerProfileVerticalPodAutoscaler { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WorkloadAutoScalerProfileVerticalPodAutoscaler; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WorkloadAutoScalerProfileVerticalPodAutoscaler = value ?? null /* model class */; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemData = value ?? null /* model class */; } /// Internal Acessors for SystemDataCreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// Internal Acessors for SystemDataCreatedBy - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } /// Internal Acessors for SystemDataCreatedByType - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? null; } /// Internal Acessors for SystemDataLastModifiedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// Internal Acessors for SystemDataLastModifiedBy - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } /// Internal Acessors for SystemDataLastModifiedByType - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Type = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] @@ -596,10 +846,34 @@ public partial class ManagedCluster : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfile NetworkProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NetworkProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NetworkProfile = value ?? null /* model class */; } + /// Ingress type for the default NginxIngressController custom resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string NginxDefaultIngressControllerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NginxDefaultIngressControllerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NginxDefaultIngressControllerType = value ?? null; } + + /// + /// The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless mode is + /// 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to + /// be deleted, which will drain and delete the nodes associated with those pools. It is strongly recommended to not do this + /// unless there are idle nodes ready to take the pods evicted by that action. If not specified, the default is Auto. For + /// more information see aka.ms/aks/nap#node-pools. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string NodeProvisioningProfileDefaultNodePool { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NodeProvisioningProfileDefaultNodePool; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NodeProvisioningProfileDefaultNodePool = value ?? null; } + + /// The node provisioning mode. If not specified, the default is Manual. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string NodeProvisioningProfileMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NodeProvisioningProfileMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NodeProvisioningProfileMode = value ?? null; } + /// The name of the resource group containing agent pool nodes. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string NodeResourceGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NodeResourceGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NodeResourceGroup = value ?? null; } + /// + /// The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string NodeResourceGroupProfileRestrictionLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NodeResourceGroupProfileRestrictionLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).NodeResourceGroupProfileRestrictionLevel = value ?? null; } + /// Whether the OIDC issuer is enabled. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? OidcIssuerProfileEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OidcIssuerProfileEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OidcIssuerProfileEnabled = value ?? default(bool); } @@ -609,8 +883,44 @@ public partial class ManagedCluster : public string OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OidcIssuerProfileIssuerUrl; } /// - /// Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. - /// See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + /// Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections + /// such as checking for deprecated API usage. Enable this option only with caution. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? OverrideSettingForceUpgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OverrideSettingForceUpgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OverrideSettingForceUpgrade = value ?? default(bool); } + + /// + /// Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness + /// won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. + /// It must be set for the overrides to take effect. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public global::System.DateTime? OverrideSettingUntil { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OverrideSettingUntil; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).OverrideSettingUntil = value ?? default(global::System.DateTime); } + + /// Certificate chain object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginCertChainObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PluginCertChainObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PluginCertChainObjectName = value ?? null; } + + /// Intermediate certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginCertObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PluginCertObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PluginCertObjectName = value ?? null; } + + /// Intermediate certificate private key object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginKeyObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PluginKeyObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PluginKeyObjectName = value ?? null; } + + /// The resource ID of the Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginKeyVaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PluginKeyVaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PluginKeyVaultId = value ?? null; } + + /// Root certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginRootCertObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PluginRootCertObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PluginRootCertObjectName = value ?? null; } + + /// + /// Whether pod identity is allowed to run on clusters with Kubenet networking. Running in Kubenet is disabled by default + /// due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin + /// with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) /// for more information. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] @@ -647,11 +957,33 @@ public partial class ManagedCluster : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterProperties()); set => this._property = value; } + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorAdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorCode; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ProvisioningErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorDetail; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorMessage; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningErrorTarget; } + /// The current provisioning state. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ProvisioningState; } - /// Allow or deny public network access for AKS + /// + /// PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).PublicNetworkAccess = value ?? null; } @@ -659,10 +991,27 @@ public partial class ManagedCluster : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + /// + /// The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create sequence) + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ResourceUid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ResourceUid; } + /// Whether to enable Defender threat detection [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? SecurityMonitoringEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityMonitoringEnabled = value ?? default(bool); } + /// + /// A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information + /// see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List SecurityProfileCustomCaTrustCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileCustomCaTrustCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SecurityProfileCustomCaTrustCertificate = value ?? null /* arrayOf */; } + + /// Mode of the service mesh. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ServiceMeshProfileMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ServiceMeshProfileMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ServiceMeshProfileMode = value ?? null; } + /// The ID for the service principal. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string ServicePrincipalProfileClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfileClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfileClientId = value ?? null; } @@ -683,7 +1032,7 @@ public partial class ManagedCluster : public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSkuInternal)Sku).Name = value ?? null; } /// - /// If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) + /// The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) /// for more details. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] @@ -699,6 +1048,12 @@ public partial class ManagedCluster : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public System.Collections.Generic.List SshPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SshPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SshPublicKey = value ?? null /* arrayOf */; } + /// + /// The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string SupportPlan { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SupportPlan; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).SupportPlan = value ?? null; } + /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// @@ -739,6 +1094,22 @@ public partial class ManagedCluster : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Type; } + /// Whether to enable VPA. Default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? VerticalPodAutoscalerEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).VerticalPodAutoscalerEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).VerticalPodAutoscalerEnabled = value ?? default(bool); } + + /// + /// Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing + /// add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be + /// in the same resource group and all private DNS zones must be in the same resource group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List WebAppRoutingDnsZoneResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WebAppRoutingDnsZoneResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WebAppRoutingDnsZoneResourceId = value ?? null /* arrayOf */; } + + /// Whether to enable the Application Routing add-on. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? WebAppRoutingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WebAppRoutingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WebAppRoutingEnabled = value ?? default(bool); } + /// /// Specifies the password of the administrator account.

**Minimum-length:** 8 characters

**Max-length:** /// 123 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters @@ -758,7 +1129,7 @@ public partial class ManagedCluster : public string WindowProfileAdminUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WindowProfileAdminUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WindowProfileAdminUsername = value ?? null; } /// - /// For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). + /// Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? WindowProfileEnableCsiProxy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WindowProfileEnableCsiProxy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)Property).WindowProfileEnableCsiProxy = value ?? default(bool); } @@ -905,9 +1276,22 @@ public partial interface IManagedCluster : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfile) })] System.Collections.Generic.List AgentPoolProfile { get; set; } /// - /// IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use - /// Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized - /// IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + /// Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain operator enabled or not. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain operator enabled or not.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? AiToolchainOperatorProfileEnabled { get; set; } + /// + /// The IP ranges authorized to access the Kubernetes API server. IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + /// This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. + /// For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -915,7 +1299,7 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges).", + Description = @"The IP ranges authorized to access the Kubernetes API server. IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges).", SerializedName = @"authorizedIPRanges", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List ApiServerAccessProfileAuthorizedIPRange { get; set; } @@ -931,7 +1315,7 @@ public partial interface IManagedCluster : PossibleTypes = new [] { typeof(bool) })] bool? ApiServerAccessProfileDisableRunCommand { get; set; } /// - /// For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). + /// Whether to create the cluster as a private cluster or not. For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -939,7 +1323,7 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters).", + Description = @"Whether to create the cluster as a private cluster or not. For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters).", SerializedName = @"enablePrivateCluster", PossibleTypes = new [] { typeof(bool) })] bool? ApiServerAccessProfileEnablePrivateCluster { get; set; } @@ -955,7 +1339,20 @@ public partial interface IManagedCluster : PossibleTypes = new [] { typeof(bool) })] bool? ApiServerAccessProfileEnablePrivateClusterPublicFqdn { get; set; } /// - /// The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). + /// Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more details.", + SerializedName = @"enableVnetIntegration", + PossibleTypes = new [] { typeof(bool) })] + bool? ApiServerAccessProfileEnableVnetIntegration { get; set; } + /// + /// The private DNS zone mode for the cluster. The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). /// Allowed values are 'system' and 'none'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -964,23 +1361,69 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are 'system' and 'none'.", + Description = @"The private DNS zone mode for the cluster. The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are 'system' and 'none'.", SerializedName = @"privateDNSZone", PossibleTypes = new [] { typeof(string) })] string ApiServerAccessProfilePrivateDnsZone { get; set; } - /// Valid values are 'true' and 'false' + /// + /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with BYO + /// Vnet, or when updating an existing cluster to enable apiserver vnet integration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration.", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string ApiServerAccessProfileSubnetId { get; set; } + /// + /// Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false' + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Valid values are 'true' and 'false'", + Description = @"Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false'", SerializedName = @"balance-similar-node-groups", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileBalanceSimilarNodeGroup { get; set; } /// - /// If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + /// DaemonSet pods will be gracefully terminated from empty nodes. If set to true, all daemonset pods on empty nodes will + /// be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"DaemonSet pods will be gracefully terminated from empty nodes. If set to true, all daemonset pods on empty nodes will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted.", + SerializedName = @"daemonset-eviction-for-empty-nodes", + PossibleTypes = new [] { typeof(bool) })] + bool? AutoScalerProfileDaemonsetEvictionForEmptyNode { get; set; } + /// + /// DaemonSet pods will be gracefully terminated from non-empty nodes. If set to true, all daemonset pods on occupied nodes + /// will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"DaemonSet pods will be gracefully terminated from non-empty nodes. If set to true, all daemonset pods on occupied nodes will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted.", + SerializedName = @"daemonset-eviction-for-occupied-nodes", + PossibleTypes = new [] { typeof(bool) })] + bool? AutoScalerProfileDaemonsetEvictionForOccupiedNode { get; set; } + /// + /// The expander to use when scaling up. If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) /// for more information. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -989,35 +1432,56 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for more information.", + Description = @"The expander to use when scaling up. If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for more information.", SerializedName = @"expander", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("least-waste", "most-pods", "priority", "random")] string AutoScalerProfileExpander { get; set; } - /// The default is 10. + /// + /// Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the resources + /// used by daemonset will be taken into account when making scaling down decisions. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the resources used by daemonset will be taken into account when making scaling down decisions.", + SerializedName = @"ignore-daemonsets-utilization", + PossibleTypes = new [] { typeof(bool) })] + bool? AutoScalerProfileIgnoreDaemonsetsUtilization { get; set; } + /// + /// The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is + /// 10. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is 10.", + Description = @"The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is 10.", SerializedName = @"max-empty-bulk-delete", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileMaxEmptyBulkDelete { get; set; } - /// The default is 600. + /// + /// The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. The default + /// is 600. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is 600.", + Description = @"The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. The default is 600.", SerializedName = @"max-graceful-termination-sec", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileMaxGracefulTerminationSec { get; set; } /// - /// The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1025,25 +1489,29 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"max-node-provision-time", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileMaxNodeProvisionTime { get; set; } - /// The default is 45. The maximum is 100 and the minimum is 0. + /// + /// The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler halts operations. + /// The default is 45. The maximum is 100 and the minimum is 0. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is 45. The maximum is 100 and the minimum is 0.", + Description = @"The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler halts operations. The default is 45. The maximum is 100 and the minimum is 0.", SerializedName = @"max-total-unready-percentage", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileMaxTotalUnreadyPercentage { get; set; } /// - /// For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all - /// the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be - /// an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + /// Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want CA to + /// act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're + /// a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' + /// for hours, etc). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1051,23 +1519,27 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc).", + Description = @"Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc).", SerializedName = @"new-pod-scale-up-delay", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileNewPodScaleUpDelay { get; set; } - /// This must be an integer. The default is 3. + /// + /// The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default + /// is 3. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"This must be an integer. The default is 3.", + Description = @"The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default is 3.", SerializedName = @"ok-total-unready-count", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileOkTotalUnreadyCount { get; set; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer followed by + /// an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1075,13 +1547,13 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-delay-after-add", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileScaleDownDelayAfterAdd { get; set; } /// - /// The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) - /// is supported. + /// How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1089,12 +1561,13 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-delay-after-delete", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileScaleDownDelayAfterDelete { get; set; } /// - /// The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1102,12 +1575,13 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-delay-after-failure", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileScaleDownDelayAfterFailure { get; set; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1115,12 +1589,13 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-unneeded-time", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileScaleDownUnneededTime { get; set; } /// - /// The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long an unready node should be unneeded before it is eligible for scale down. The default is '20m'. Values must be + /// an integer followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1128,56 +1603,82 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long an unready node should be unneeded before it is eligible for scale down. The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-unready-time", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileScaleDownUnreadyTime { get; set; } - /// The default is '0.5'. + /// + /// Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered + /// for scale down. The default is '0.5'. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is '0.5'.", + Description = @"Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down. The default is '0.5'.", SerializedName = @"scale-down-utilization-threshold", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileScaleDownUtilizationThreshold { get; set; } - /// The default is '10'. Values must be an integer number of seconds. + /// + /// How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is '10'. Values must be an integer number of seconds.", + Description = @"How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds.", SerializedName = @"scan-interval", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileScanInterval { get; set; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. The default + /// is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is true.", + Description = @"If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. The default is true.", SerializedName = @"skip-nodes-with-local-storage", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileSkipNodesWithLocalStorage { get; set; } - /// The default is true. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + /// + /// If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods). The default + /// is true. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is true.", + Description = @"If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods). The default is true.", SerializedName = @"skip-nodes-with-system-pods", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileSkipNodesWithSystemPod { get; set; } /// - /// For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + /// Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage.", + SerializedName = @"nodeOSUpgradeChannel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("None", "Unmanaged", "NodeImage", "SecurityPatch")] + string AutoUpgradeProfileNodeOSUpgradeChannel { get; set; } + /// + /// The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster auto-upgrade + /// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1185,7 +1686,7 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel).", + Description = @"The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel).", SerializedName = @"upgradeChannel", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("rapid", "stable", "patch", "node-image", "none")] @@ -1217,9 +1718,9 @@ public partial interface IManagedCluster : PossibleTypes = new [] { typeof(string) })] string AzureKeyVaultKmKeyId { get; set; } /// - /// Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public - /// access from all networks. `Private` means the key vault disables public access and enables private link. The default value - /// is `Public`. + /// Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` + /// means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables + /// private link. The default value is `Public`. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1227,7 +1728,7 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables private link. The default value is `Public`.", + Description = @"Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables private link. The default value is `Public`.", SerializedName = @"keyVaultNetworkAccess", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Public", "Private")] @@ -1247,8 +1748,10 @@ public partial interface IManagedCluster : PossibleTypes = new [] { typeof(string) })] string AzureKeyVaultKmKeyVaultResourceId { get; set; } /// - /// 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. + /// 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. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1256,7 +1759,7 @@ public partial interface IManagedCluster : Read = true, Create = false, Update = false, - Description = @"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.", + Description = @"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.", SerializedName = @"azurePortalFQDN", PossibleTypes = new [] { typeof(string) })] string AzurePortalFqdn { get; } @@ -1271,9 +1774,72 @@ public partial interface IManagedCluster : SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] bool? BlobCsiDriverEnabled { get; set; } + /// The artifact source. The source where the artifacts are downloaded from. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The artifact source. The source where the artifacts are downloaded from.", + SerializedName = @"artifactSource", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Cache", "Direct")] + string BootstrapProfileArtifactSource { get; set; } + /// + /// The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy.", + SerializedName = @"containerRegistryId", + PossibleTypes = new [] { typeof(string) })] + string BootstrapProfileContainerRegistryId { get; set; } + /// Istio egress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Istio egress gateways.", + SerializedName = @"egressGateways", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway) })] + System.Collections.Generic.List ComponentEgressGateway { get; set; } + /// Istio ingress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Istio ingress gateways.", + SerializedName = @"ingressGateways", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway) })] + System.Collections.Generic.List ComponentIngressGateway { get; set; } + /// + /// Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. + /// Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If + /// not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? CostAnalysisEnabled { get; set; } /// - /// If kubernetesVersion was a fully specified version , this field will be exactly equal to it. If kubernetesVersion - /// was , this field will contain the full version being used. + /// The version of Kubernetes the Managed Cluster is running. If kubernetesVersion was a fully specified version , + /// this field will be exactly equal to it. If kubernetesVersion was , this field will contain the full + /// version being used. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1281,7 +1847,7 @@ public partial interface IManagedCluster : Read = true, Create = false, Update = false, - Description = @"If kubernetesVersion was a fully specified version , this field will be exactly equal to it. If kubernetesVersion was , this field will contain the full version being used.", + Description = @"The version of Kubernetes the Managed Cluster is running. If kubernetesVersion was a fully specified version , this field will be exactly equal to it. If kubernetesVersion was , this field will contain the full version being used.", SerializedName = @"currentKubernetesVersion", PossibleTypes = new [] { typeof(string) })] string CurrentKubernetesVersion { get; } @@ -1301,8 +1867,9 @@ public partial interface IManagedCluster : PossibleTypes = new [] { typeof(string) })] string DefenderLogAnalyticsWorkspaceResourceId { get; set; } /// - /// If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters - /// that are AAD enabled. For more details see [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + /// If local accounts should be disabled on the Managed Cluster. If set to true, getting static credentials will be disabled + /// for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see [disable local + /// accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1310,7 +1877,7 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview).", + Description = @"If local accounts should be disabled on the Managed Cluster. If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview).", SerializedName = @"disableLocalAccounts", PossibleTypes = new [] { typeof(bool) })] bool? DisableLocalAccount { get; set; } @@ -1326,7 +1893,7 @@ public partial interface IManagedCluster : PossibleTypes = new [] { typeof(bool) })] bool? DiskCsiDriverEnabled { get; set; } /// - /// This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' + /// The Resource ID of the disk encryption set to use for enabling encryption at rest. This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1334,35 +1901,38 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'", + Description = @"The Resource ID of the disk encryption set to use for enabling encryption at rest. This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'", SerializedName = @"diskEncryptionSetID", PossibleTypes = new [] { typeof(string) })] string DiskEncryptionSetId { get; set; } - /// This cannot be updated once the Managed Cluster has been created. + /// + /// The DNS prefix of the Managed Cluster. This cannot be updated once the Managed Cluster has been created. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"This cannot be updated once the Managed Cluster has been created.", + Description = @"The DNS prefix of the Managed Cluster. This cannot be updated once the Managed Cluster has been created.", SerializedName = @"dnsPrefix", PossibleTypes = new [] { typeof(string) })] string DnsPrefix { get; set; } /// - /// (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes - /// v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + /// 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. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Read = true, - Create = true, - Update = true, - Description = @"(DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp.", - SerializedName = @"enablePodSecurityPolicy", - PossibleTypes = new [] { typeof(bool) })] - bool? EnablePodSecurityPolicy { get; set; } + Create = false, + Update = false, + Description = @"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.", + SerializedName = @"eTag", + PossibleTypes = new [] { typeof(string) })] + string ETag { get; } /// Whether to enable Kubernetes Role-Based Access Control. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1419,14 +1989,17 @@ public partial interface IManagedCluster : SerializedName = @"fqdn", PossibleTypes = new [] { typeof(string) })] string Fqdn { get; } - /// This cannot be updated once the Managed Cluster has been created. + /// + /// The FQDN subdomain of the private cluster with custom private dns zone. This cannot be updated once the Managed Cluster + /// has been created. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"This cannot be updated once the Managed Cluster has been created.", + Description = @"The FQDN subdomain of the private cluster with custom private dns zone. This cannot be updated once the Managed Cluster has been created.", SerializedName = @"fqdnSubdomain", PossibleTypes = new [] { typeof(string) })] string FqdnSubdomain { get; set; } @@ -1444,14 +2017,16 @@ public partial interface IManagedCluster : SerializedName = @"dnsServer", PossibleTypes = new [] { typeof(string) })] string GmsaProfileDnsServer { get; set; } - /// Specifies whether to enable Windows gMSA in the managed cluster. + /// + /// Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Specifies whether to enable Windows gMSA in the managed cluster.", + Description = @"Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster.", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] bool? GmsaProfileEnabled { get; set; } @@ -1513,6 +2088,42 @@ public partial interface IManagedCluster : SerializedName = @"trustedCa", PossibleTypes = new [] { typeof(string) })] string HttpProxyConfigTrustedCa { get; set; } + /// The client ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The client ID of the user assigned identity.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string IdentityClientId { get; } + /// + /// The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource Provider, + /// and managed cluster only accept one delegated identity resource. Internal use only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource Provider, and managed cluster only accept one delegated identity resource. Internal use only.", + SerializedName = @"delegatedResources", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources IdentityDelegatedResource { get; set; } + /// The object ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The object ID of the user assigned identity.", + SerializedName = @"objectId", + PossibleTypes = new [] { typeof(string) })] + string IdentityObjectId { get; } /// /// The principal id of the system assigned identity which is used by master components. /// @@ -1526,17 +2137,31 @@ public partial interface IManagedCluster : SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] string IdentityPrincipalId { get; } - /// Identities associated with the cluster. + /// + /// The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned + /// identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Identities associated with the cluster.", + Description = @"The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned identity is allowed. The only accepted key is ""kubeletidentity"", with value of ""resourceId"": ""/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}"".", SerializedName = @"identityProfile", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesIdentityProfile) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesIdentityProfile IdentityProfile { get; set; } + /// The resource ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The resource ID of the user assigned identity.", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + string IdentityResourceId { get; } /// /// The tenant id of the system assigned identity which is used by master components. /// @@ -1551,7 +2176,7 @@ public partial interface IManagedCluster : PossibleTypes = new [] { typeof(string) })] string IdentityTenantId { get; } /// - /// For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + /// The type of identity used for the managed cluster. For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1559,13 +2184,14 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity).", + Description = @"The type of identity used for the managed cluster. For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity).", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "None")] string IdentityType { get; set; } /// - /// The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The user identity associated with the managed cluster. This identity will be used in control plane. Only one user assigned + /// identity is allowed. The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1573,7 +2199,7 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", + Description = @"The user identity associated with the managed cluster. This identity will be used in control plane. Only one user assigned identity is allowed. The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", SerializedName = @"userAssignedIdentities", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityUserAssignedIdentities) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } @@ -1599,6 +2225,20 @@ public partial interface IManagedCluster : SerializedName = @"intervalHours", PossibleTypes = new [] { typeof(int) })] int? ImageCleanerIntervalHour { get; set; } + /// + /// The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary + /// upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade", + SerializedName = @"revisions", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List IstioRevision { get; set; } /// Whether to enable KEDA. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1611,6 +2251,19 @@ public partial interface IManagedCluster : PossibleTypes = new [] { typeof(bool) })] bool? KedaEnabled { get; set; } /// + /// This is primarily used to expose different UI experiences in the portal for different kinds + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"This is primarily used to expose different UI experiences in the portal for different kinds", + SerializedName = @"kind", + PossibleTypes = new [] { typeof(string) })] + string Kind { get; set; } + /// /// Comma-separated list of Kubernetes annotation keys that will be used in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). /// By default the metric contains only resource name and namespace labels. /// @@ -1639,12 +2292,12 @@ public partial interface IManagedCluster : PossibleTypes = new [] { typeof(string) })] string KubeStateMetricLabelsAllowlist { get; set; } /// - /// Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When - /// is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same - /// once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. - /// When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed - /// sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, - /// however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) + /// The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + /// (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. + /// Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, + /// even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot + /// be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x + /// -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) /// for more details. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -1653,7 +2306,7 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details.", + Description = @"The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details.", SerializedName = @"kubernetesVersion", PossibleTypes = new [] { typeof(string) })] string KubernetesVersion { get; set; } @@ -1704,6 +2357,48 @@ public partial interface IManagedCluster : SerializedName = @"networkProfile", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfile) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfile NetworkProfile { get; set; } + /// Ingress type for the default NginxIngressController custom resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Ingress type for the default NginxIngressController custom resource", + SerializedName = @"defaultIngressControllerType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("AnnotationControlled", "External", "Internal", "None")] + string NginxDefaultIngressControllerType { get; set; } + /// + /// The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless mode is + /// 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to + /// be deleted, which will drain and delete the nodes associated with those pools. It is strongly recommended to not do this + /// unless there are idle nodes ready to take the pods evicted by that action. If not specified, the default is Auto. For + /// more information see aka.ms/aks/nap#node-pools. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless mode is 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to be deleted, which will drain and delete the nodes associated with those pools. It is strongly recommended to not do this unless there are idle nodes ready to take the pods evicted by that action. If not specified, the default is Auto. For more information see aka.ms/aks/nap#node-pools.", + SerializedName = @"defaultNodePools", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("None", "Auto")] + string NodeProvisioningProfileDefaultNodePool { get; set; } + /// The node provisioning mode. If not specified, the default is Manual. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The node provisioning mode. If not specified, the default is Manual.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Manual", "Auto")] + string NodeProvisioningProfileMode { get; set; } /// The name of the resource group containing agent pool nodes. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1715,6 +2410,20 @@ public partial interface IManagedCluster : SerializedName = @"nodeResourceGroup", PossibleTypes = new [] { typeof(string) })] string NodeResourceGroup { get; set; } + /// + /// The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted'", + SerializedName = @"restrictionLevel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Unrestricted", "ReadOnly")] + string NodeResourceGroupProfileRestrictionLevel { get; set; } /// Whether the OIDC issuer is enabled. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1738,8 +2447,93 @@ public partial interface IManagedCluster : PossibleTypes = new [] { typeof(string) })] string OidcIssuerProfileIssuerUrl { get; } /// - /// Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. - /// See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + /// Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections + /// such as checking for deprecated API usage. Enable this option only with caution. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections such as checking for deprecated API usage. Enable this option only with caution.", + SerializedName = @"forceUpgrade", + PossibleTypes = new [] { typeof(bool) })] + bool? OverrideSettingForceUpgrade { get; set; } + /// + /// Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness + /// won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. + /// It must be set for the overrides to take effect. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. It must be set for the overrides to take effect.", + SerializedName = @"until", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OverrideSettingUntil { get; set; } + /// Certificate chain object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Certificate chain object name in Azure Key Vault.", + SerializedName = @"certChainObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginCertChainObjectName { get; set; } + /// Intermediate certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Intermediate certificate object name in Azure Key Vault.", + SerializedName = @"certObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginCertObjectName { get; set; } + /// Intermediate certificate private key object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Intermediate certificate private key object name in Azure Key Vault.", + SerializedName = @"keyObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginKeyObjectName { get; set; } + /// The resource ID of the Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The resource ID of the Key Vault.", + SerializedName = @"keyVaultId", + PossibleTypes = new [] { typeof(string) })] + string PluginKeyVaultId { get; set; } + /// Root certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Root certificate object name in Azure Key Vault.", + SerializedName = @"rootCertObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginRootCertObjectName { get; set; } + /// + /// Whether pod identity is allowed to run on clusters with Kubenet networking. Running in Kubenet is disabled by default + /// due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin + /// with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) /// for more information. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -1748,7 +2542,7 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) for more information.", + Description = @"Whether pod identity is allowed to run on clusters with Kubenet networking. Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) for more information.", SerializedName = @"allowNetworkPluginKubenet", PossibleTypes = new [] { typeof(bool) })] bool? PodIdentityProfileAllowNetworkPluginKubenet { get; set; } @@ -1819,6 +2613,61 @@ public partial interface IManagedCluster : SerializedName = @"privateLinkResources", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkResource) })] System.Collections.Generic.List PrivateLinkResource { get; set; } + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorCode { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) })] + System.Collections.Generic.List ProvisioningErrorDetail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorMessage { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorTarget { get; } /// The current provisioning state. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1830,18 +2679,33 @@ public partial interface IManagedCluster : SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] string ProvisioningState { get; } - /// Allow or deny public network access for AKS + /// + /// PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Allow or deny public network access for AKS", + Description = @"PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS", SerializedName = @"publicNetworkAccess", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Enabled", "Disabled")] string PublicNetworkAccess { get; set; } + /// + /// The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create sequence) + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create sequence)", + SerializedName = @"resourceUID", + PossibleTypes = new [] { typeof(string) })] + string ResourceUid { get; } /// Whether to enable Defender threat detection [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1853,6 +2717,32 @@ public partial interface IManagedCluster : SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] bool? SecurityMonitoringEnabled { get; set; } + /// + /// A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information + /// see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority).", + SerializedName = @"customCATrustCertificates", + PossibleTypes = new [] { typeof(byte[]) })] + System.Collections.Generic.List SecurityProfileCustomCaTrustCertificate { get; set; } + /// Mode of the service mesh. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Mode of the service mesh.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Istio", "Disabled")] + string ServiceMeshProfileMode { get; set; } /// The ID for the service principal. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1885,10 +2775,10 @@ public partial interface IManagedCluster : Description = @"The name of a managed cluster SKU.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Base")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Base", "Automatic")] string SkuName { get; set; } /// - /// If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) + /// The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) /// for more details. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -1897,10 +2787,10 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details.", + Description = @"The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details.", SerializedName = @"tier", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Standard", "Free")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Premium", "Standard", "Free")] string SkuTier { get; set; } /// Whether to enable Snapshot Controller. The default value is true. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -1927,6 +2817,57 @@ public partial interface IManagedCluster : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceSshPublicKey) })] System.Collections.Generic.List SshPublicKey { get; set; } /// + /// The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'.", + SerializedName = @"supportPlan", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("KubernetesOfficial", "AKSLongTermSupport")] + string SupportPlan { get; set; } + /// Whether to enable VPA. Default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable VPA. Default value is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? VerticalPodAutoscalerEnabled { get; set; } + /// + /// Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing + /// add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be + /// in the same resource group and all private DNS zones must be in the same resource group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in the same resource group.", + SerializedName = @"dnsZoneResourceIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List WebAppRoutingDnsZoneResourceId { get; set; } + /// Whether to enable the Application Routing add-on. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable the Application Routing add-on.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? WebAppRoutingEnabled { get; set; } + /// /// Specifies the password of the administrator account.

**Minimum-length:** 8 characters

**Max-length:** /// 123 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters ///
Has upper characters
Has a digit
Has a special character (Regex match [\W_])

**Disallowed values:** @@ -1959,7 +2900,7 @@ public partial interface IManagedCluster : PossibleTypes = new [] { typeof(string) })] string WindowProfileAdminUsername { get; set; } /// - /// For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). + /// Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1967,7 +2908,7 @@ public partial interface IManagedCluster : Read = true, Create = true, Update = true, - Description = @"For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy).", + Description = @"Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy).", SerializedName = @"enableCSIProxy", PossibleTypes = new [] { typeof(bool) })] bool? WindowProfileEnableCsiProxy { get; set; } @@ -2031,88 +2972,157 @@ internal partial interface IManagedClusterInternal : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAddonProfiles AddonProfile { get; set; } /// The agent pool properties. System.Collections.Generic.List AgentPoolProfile { get; set; } + /// AI toolchain operator settings that apply to the whole cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile AiToolchainOperatorProfile { get; set; } + /// + /// Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain operator enabled or not. + /// + bool? AiToolchainOperatorProfileEnabled { get; set; } /// The access profile for managed cluster API server. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfile ApiServerAccessProfile { get; set; } /// - /// IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use - /// Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized - /// IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + /// The IP ranges authorized to access the Kubernetes API server. IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + /// This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. + /// For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). /// System.Collections.Generic.List ApiServerAccessProfileAuthorizedIPRange { get; set; } /// Whether to disable run command for the cluster or not. bool? ApiServerAccessProfileDisableRunCommand { get; set; } /// - /// For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). + /// Whether to create the cluster as a private cluster or not. For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). /// bool? ApiServerAccessProfileEnablePrivateCluster { get; set; } /// Whether to create additional public FQDN for private cluster or not. bool? ApiServerAccessProfileEnablePrivateClusterPublicFqdn { get; set; } /// - /// The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). + /// Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more details. + /// + bool? ApiServerAccessProfileEnableVnetIntegration { get; set; } + /// + /// The private DNS zone mode for the cluster. The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). /// Allowed values are 'system' and 'none'. /// string ApiServerAccessProfilePrivateDnsZone { get; set; } + /// + /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with BYO + /// Vnet, or when updating an existing cluster to enable apiserver vnet integration. + /// + string ApiServerAccessProfileSubnetId { get; set; } /// Parameters to be applied to the cluster-autoscaler when enabled Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfile AutoScalerProfile { get; set; } - /// Valid values are 'true' and 'false' + /// + /// Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false' + /// string AutoScalerProfileBalanceSimilarNodeGroup { get; set; } /// - /// If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + /// DaemonSet pods will be gracefully terminated from empty nodes. If set to true, all daemonset pods on empty nodes will + /// be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + bool? AutoScalerProfileDaemonsetEvictionForEmptyNode { get; set; } + /// + /// DaemonSet pods will be gracefully terminated from non-empty nodes. If set to true, all daemonset pods on occupied nodes + /// will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + bool? AutoScalerProfileDaemonsetEvictionForOccupiedNode { get; set; } + /// + /// The expander to use when scaling up. If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) /// for more information. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("least-waste", "most-pods", "priority", "random")] string AutoScalerProfileExpander { get; set; } - /// The default is 10. + /// + /// Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the resources + /// used by daemonset will be taken into account when making scaling down decisions. + /// + bool? AutoScalerProfileIgnoreDaemonsetsUtilization { get; set; } + /// + /// The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is + /// 10. + /// string AutoScalerProfileMaxEmptyBulkDelete { get; set; } - /// The default is 600. + /// + /// The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. The default + /// is 600. + /// string AutoScalerProfileMaxGracefulTerminationSec { get; set; } /// - /// The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// string AutoScalerProfileMaxNodeProvisionTime { get; set; } - /// The default is 45. The maximum is 100 and the minimum is 0. + /// + /// The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler halts operations. + /// The default is 45. The maximum is 100 and the minimum is 0. + /// string AutoScalerProfileMaxTotalUnreadyPercentage { get; set; } /// - /// For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all - /// the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be - /// an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + /// Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want CA to + /// act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're + /// a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' + /// for hours, etc). /// string AutoScalerProfileNewPodScaleUpDelay { get; set; } - /// This must be an integer. The default is 3. + /// + /// The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default + /// is 3. + /// string AutoScalerProfileOkTotalUnreadyCount { get; set; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer followed by + /// an 'm'. No unit of time other than minutes (m) is supported. /// string AutoScalerProfileScaleDownDelayAfterAdd { get; set; } /// - /// The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) - /// is supported. + /// How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// string AutoScalerProfileScaleDownDelayAfterDelete { get; set; } /// - /// The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// string AutoScalerProfileScaleDownDelayAfterFailure { get; set; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// string AutoScalerProfileScaleDownUnneededTime { get; set; } /// - /// The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long an unready node should be unneeded before it is eligible for scale down. The default is '20m'. Values must be + /// an integer followed by an 'm'. No unit of time other than minutes (m) is supported. /// string AutoScalerProfileScaleDownUnreadyTime { get; set; } - /// The default is '0.5'. + /// + /// Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered + /// for scale down. The default is '0.5'. + /// string AutoScalerProfileScaleDownUtilizationThreshold { get; set; } - /// The default is '10'. Values must be an integer number of seconds. + /// + /// How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds. + /// string AutoScalerProfileScanInterval { get; set; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. The default + /// is true. + /// string AutoScalerProfileSkipNodesWithLocalStorage { get; set; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods). The default + /// is true. + /// string AutoScalerProfileSkipNodesWithSystemPod { get; set; } /// The auto upgrade configuration. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfile AutoUpgradeProfile { get; set; } /// - /// For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + /// Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("None", "Unmanaged", "NodeImage", "SecurityPatch")] + string AutoUpgradeProfileNodeOSUpgradeChannel { get; set; } + /// + /// The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster auto-upgrade + /// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("rapid", "stable", "patch", "node-image", "none")] string AutoUpgradeProfileUpgradeChannel { get; set; } @@ -2125,9 +3135,9 @@ internal partial interface IManagedClusterInternal : ///
string AzureKeyVaultKmKeyId { get; set; } /// - /// Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public - /// access from all networks. `Private` means the key vault disables public access and enables private link. The default value - /// is `Public`. + /// Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` + /// means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables + /// private link. The default value is `Public`. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Public", "Private")] string AzureKeyVaultKmKeyVaultNetworkAccess { get; set; } @@ -2145,15 +3155,39 @@ internal partial interface IManagedClusterInternal : ///
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetrics AzureMonitorProfileMetric { get; set; } /// - /// 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. + /// 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. /// string AzurePortalFqdn { get; set; } /// Whether to enable AzureBlob CSI Driver. The default value is false. bool? BlobCsiDriverEnabled { get; set; } + /// Profile of the cluster bootstrap configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile BootstrapProfile { get; set; } + /// The artifact source. The source where the artifacts are downloaded from. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Cache", "Direct")] + string BootstrapProfileArtifactSource { get; set; } + /// + /// The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy. + /// + string BootstrapProfileContainerRegistryId { get; set; } + /// Plugin certificates information for Service Mesh. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority CertificateAuthorityPlugin { get; set; } + /// Istio egress gateways. + System.Collections.Generic.List ComponentEgressGateway { get; set; } + /// Istio ingress gateways. + System.Collections.Generic.List ComponentIngressGateway { get; set; } + /// + /// Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. + /// Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If + /// not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. + /// + bool? CostAnalysisEnabled { get; set; } /// - /// If kubernetesVersion was a fully specified version , this field will be exactly equal to it. If kubernetesVersion - /// was , this field will contain the full version being used. + /// The version of Kubernetes the Managed Cluster is running. If kubernetesVersion was a fully specified version , + /// this field will be exactly equal to it. If kubernetesVersion was , this field will contain the full + /// version being used. /// string CurrentKubernetesVersion { get; set; } /// @@ -2167,23 +3201,27 @@ internal partial interface IManagedClusterInternal : /// Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderSecurityMonitoring DefenderSecurityMonitoring { get; set; } /// - /// If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters - /// that are AAD enabled. For more details see [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + /// If local accounts should be disabled on the Managed Cluster. If set to true, getting static credentials will be disabled + /// for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see [disable local + /// accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). /// bool? DisableLocalAccount { get; set; } /// Whether to enable AzureDisk CSI Driver. The default value is true. bool? DiskCsiDriverEnabled { get; set; } /// - /// This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' + /// The Resource ID of the disk encryption set to use for enabling encryption at rest. This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' /// string DiskEncryptionSetId { get; set; } - /// This cannot be updated once the Managed Cluster has been created. + /// + /// The DNS prefix of the Managed Cluster. This cannot be updated once the Managed Cluster has been created. + /// string DnsPrefix { get; set; } /// - /// (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes - /// v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + /// 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. /// - bool? EnablePodSecurityPolicy { get; set; } + string ETag { get; set; } /// Whether to enable Kubernetes Role-Based Access Control. bool? EnableRbac { get; set; } /// The extended location of the Virtual Machine. @@ -2197,14 +3235,19 @@ internal partial interface IManagedClusterInternal : bool? FileCsiDriverEnabled { get; set; } /// The FQDN of the master pool. string Fqdn { get; set; } - /// This cannot be updated once the Managed Cluster has been created. + /// + /// The FQDN subdomain of the private cluster with custom private dns zone. This cannot be updated once the Managed Cluster + /// has been created. + /// string FqdnSubdomain { get; set; } /// /// Specifies the DNS server for Windows gMSA.

Set it to empty if you have configured the DNS server in the vnet /// which is used to create the managed cluster. ///
string GmsaProfileDnsServer { get; set; } - /// Specifies whether to enable Windows gMSA in the managed cluster. + /// + /// Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster. + /// bool? GmsaProfileEnabled { get; set; } /// /// Specifies the root domain name for Windows gMSA.

Set it to empty if you have configured the DNS server in the @@ -2223,32 +3266,69 @@ internal partial interface IManagedClusterInternal : string HttpProxyConfigTrustedCa { get; set; } /// The identity of the managed cluster, if configured. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentity Identity { get; set; } + /// The client ID of the user assigned identity. + string IdentityClientId { get; set; } + /// + /// The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource Provider, + /// and managed cluster only accept one delegated identity resource. Internal use only. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources IdentityDelegatedResource { get; set; } + /// The object ID of the user assigned identity. + string IdentityObjectId { get; set; } /// /// The principal id of the system assigned identity which is used by master components. /// string IdentityPrincipalId { get; set; } - /// Identities associated with the cluster. + /// + /// The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned + /// identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". + /// Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesIdentityProfile IdentityProfile { get; set; } + /// The resource ID of the user assigned identity. + string IdentityResourceId { get; set; } /// /// The tenant id of the system assigned identity which is used by master components. /// string IdentityTenantId { get; set; } /// - /// For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + /// The type of identity used for the managed cluster. For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "None")] string IdentityType { get; set; } /// - /// The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The user identity associated with the managed cluster. This identity will be used in control plane. Only one user assigned + /// identity is allowed. The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. /// Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } /// Whether to enable Image Cleaner on AKS cluster. bool? ImageCleanerEnabled { get; set; } /// Image Cleaner scanning interval in hours. int? ImageCleanerIntervalHour { get; set; } + /// Ingress profile for the managed cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile IngressProfile { get; set; } + /// + /// App Routing settings for the ingress profile. You can find an overview and onboarding guide for this feature at https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting IngressProfileWebAppRouting { get; set; } + /// + /// Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described + /// here https://aka.ms/asm-plugin-ca + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority IstioCertificateAuthority { get; set; } + /// Istio components configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents IstioComponent { get; set; } + /// + /// The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary + /// upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + /// + System.Collections.Generic.List IstioRevision { get; set; } /// Whether to enable KEDA. bool? KedaEnabled { get; set; } /// + /// This is primarily used to expose different UI experiences in the portal for different kinds + /// + string Kind { get; set; } + /// /// Comma-separated list of Kubernetes annotation keys that will be used in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). /// By default the metric contains only resource name and namespace labels. /// @@ -2259,12 +3339,12 @@ internal partial interface IManagedClusterInternal : ///
string KubeStateMetricLabelsAllowlist { get; set; } /// - /// Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When - /// is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same - /// once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. - /// When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed - /// sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, - /// however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) + /// The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + /// (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. + /// Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, + /// even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot + /// be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x + /// -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) /// for more details. /// string KubernetesVersion { get; set; } @@ -2286,10 +3366,38 @@ internal partial interface IManagedClusterInternal : /// pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. ///
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileKubeStateMetrics MetricKubeStateMetric { get; set; } + /// The configuration for detailed per-Kubernetes resource cost analysis. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis MetricProfileCostAnalysis { get; set; } + /// Optional cluster metrics configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile MetricsProfile { get; set; } /// The network configuration profile. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfile NetworkProfile { get; set; } + /// Ingress type for the default NginxIngressController custom resource + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("AnnotationControlled", "External", "Internal", "None")] + string NginxDefaultIngressControllerType { get; set; } + /// Node provisioning settings that apply to the whole cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile NodeProvisioningProfile { get; set; } + /// + /// The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless mode is + /// 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to + /// be deleted, which will drain and delete the nodes associated with those pools. It is strongly recommended to not do this + /// unless there are idle nodes ready to take the pods evicted by that action. If not specified, the default is Auto. For + /// more information see aka.ms/aks/nap#node-pools. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("None", "Auto")] + string NodeProvisioningProfileDefaultNodePool { get; set; } + /// The node provisioning mode. If not specified, the default is Manual. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Manual", "Auto")] + string NodeProvisioningProfileMode { get; set; } /// The name of the resource group containing agent pool nodes. string NodeResourceGroup { get; set; } + /// Profile of the node resource group configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile NodeResourceGroupProfile { get; set; } + /// + /// The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted' + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Unrestricted", "ReadOnly")] + string NodeResourceGroupProfileRestrictionLevel { get; set; } /// The OIDC issuer profile of the Managed Cluster. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfile OidcIssuerProfile { get; set; } /// Whether the OIDC issuer is enabled. @@ -2297,13 +3405,35 @@ internal partial interface IManagedClusterInternal : /// The OIDC issuer url of the Managed Cluster. string OidcIssuerProfileIssuerUrl { get; set; } /// - /// See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod - /// identity integration. + /// Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections + /// such as checking for deprecated API usage. Enable this option only with caution. + /// + bool? OverrideSettingForceUpgrade { get; set; } + /// + /// Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness + /// won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. + /// It must be set for the overrides to take effect. + /// + global::System.DateTime? OverrideSettingUntil { get; set; } + /// Certificate chain object name in Azure Key Vault. + string PluginCertChainObjectName { get; set; } + /// Intermediate certificate object name in Azure Key Vault. + string PluginCertObjectName { get; set; } + /// Intermediate certificate private key object name in Azure Key Vault. + string PluginKeyObjectName { get; set; } + /// The resource ID of the Key Vault. + string PluginKeyVaultId { get; set; } + /// Root certificate object name in Azure Key Vault. + string PluginRootCertObjectName { get; set; } + /// + /// The pod identity profile of the Managed Cluster. See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on AAD pod identity integration. /// Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProfile PodIdentityProfile { get; set; } /// - /// Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. - /// See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + /// Whether pod identity is allowed to run on clusters with Kubenet networking. Running in Kubenet is disabled by default + /// due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin + /// with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) /// for more information. /// bool? PodIdentityProfileAllowNetworkPluginKubenet { get; set; } @@ -2324,11 +3454,27 @@ internal partial interface IManagedClusterInternal : System.Collections.Generic.List PrivateLinkResource { get; set; } /// Properties of a managed cluster. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterProperties Property { get; set; } + /// The error additional info. + System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get; set; } + /// The error code. + string ProvisioningErrorCode { get; set; } + /// The error details. + System.Collections.Generic.List ProvisioningErrorDetail { get; set; } + /// The error message. + string ProvisioningErrorMessage { get; set; } + /// The error target. + string ProvisioningErrorTarget { get; set; } /// The current provisioning state. string ProvisioningState { get; set; } - /// Allow or deny public network access for AKS + /// + /// PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS + /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Enabled", "Disabled")] string PublicNetworkAccess { get; set; } + /// + /// The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create sequence) + /// + string ResourceUid { get; set; } /// Whether to enable Defender threat detection bool? SecurityMonitoringEnabled { get; set; } /// Security profile for the managed cluster. @@ -2338,6 +3484,11 @@ internal partial interface IManagedClusterInternal : /// the security profile. ///
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAzureKeyVaultKms SecurityProfileAzureKeyVaultKm { get; set; } + /// + /// A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information + /// see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). + /// + System.Collections.Generic.List SecurityProfileCustomCaTrustCertificate { get; set; } /// Microsoft Defender settings for the security profile. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefender SecurityProfileDefender { get; set; } /// Image Cleaner settings for the security profile. @@ -2347,6 +3498,13 @@ internal partial interface IManagedClusterInternal : /// cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more details. ///
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileWorkloadIdentity SecurityProfileWorkloadIdentity { get; set; } + /// Service mesh profile for a managed cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile ServiceMeshProfile { get; set; } + /// Istio service mesh configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh ServiceMeshProfileIstio { get; set; } + /// Mode of the service mesh. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Istio", "Disabled")] + string ServiceMeshProfileMode { get; set; } /// /// Information about a service principal identity for the cluster to use for manipulating Azure APIs. /// @@ -2358,13 +3516,13 @@ internal partial interface IManagedClusterInternal : /// The managed cluster SKU. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSku Sku { get; set; } /// The name of a managed cluster SKU. - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Base")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Base", "Automatic")] string SkuName { get; set; } /// - /// If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) + /// The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) /// for more details. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Standard", "Free")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Premium", "Standard", "Free")] string SkuTier { get; set; } /// Whether to enable Snapshot Controller. The default value is true. bool? SnapshotControllerEnabled { get; set; } @@ -2372,6 +3530,13 @@ internal partial interface IManagedClusterInternal : /// The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. ///
System.Collections.Generic.List SshPublicKey { get; set; } + /// Contains read-only information about the Managed Cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus Status { get; set; } + /// + /// The error details information of the managed cluster. Preserves the detailed info of failure. If there was no error, this + /// field is omitted. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail StatusProvisioningError { get; set; } /// Storage profile for the managed cluster. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfile StorageProfile { get; set; } /// AzureBlob CSI Driver settings for the storage profile. @@ -2383,6 +3548,35 @@ internal partial interface IManagedClusterInternal : /// Snapshot Controller settings for the storage profile. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileSnapshotController StorageProfileSnapshotController { get; set; } /// + /// The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("KubernetesOfficial", "AKSLongTermSupport")] + string SupportPlan { get; set; } + /// Settings for upgrading a cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings UpgradeSetting { get; set; } + /// Settings for overrides. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings UpgradeSettingOverrideSetting { get; set; } + /// Whether to enable VPA. Default value is false. + bool? VerticalPodAutoscalerEnabled { get; set; } + /// + /// Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing + /// add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be + /// in the same resource group and all private DNS zones must be in the same resource group. + /// + System.Collections.Generic.List WebAppRoutingDnsZoneResourceId { get; set; } + /// Whether to enable the Application Routing add-on. + bool? WebAppRoutingEnabled { get; set; } + /// + /// Managed identity of the Application Routing add-on. This is the identity that should be granted permissions, for example, + /// to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this overview of the add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) + /// for more instructions. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity WebAppRoutingIdentity { get; set; } + /// + /// Configuration for the default NginxIngressController. See more at https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx WebAppRoutingNginx { get; set; } + /// /// Specifies the password of the administrator account.

**Minimum-length:** 8 characters

**Max-length:** /// 123 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters ///
Has upper characters
Has a digit
Has a special character (Regex match [\W_])

**Disallowed values:** @@ -2397,7 +3591,7 @@ internal partial interface IManagedClusterInternal : ///
string WindowProfileAdminUsername { get; set; } /// - /// For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). + /// Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). /// bool? WindowProfileEnableCsiProxy { get; set; } /// The Windows gMSA Profile in the Managed Cluster. @@ -2416,6 +3610,8 @@ internal partial interface IManagedClusterInternal : /// KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. ///
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileKeda WorkloadAutoScalerProfileKeda { get; set; } + /// VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler WorkloadAutoScalerProfileVerticalPodAutoscaler { get; set; } /// Whether to enable workload identity. bool? WorkloadIdentityEnabled { get; set; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedCluster.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedCluster.json.cs index 23601f6f7534..9d400a9c4664 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedCluster.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedCluster.json.cs @@ -80,6 +80,8 @@ internal ManagedCluster(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.Json {_extendedLocation = If( json?.PropertyT("extendedLocation"), out var __jsonExtendedLocation) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ExtendedLocation.FromJson(__jsonExtendedLocation) : _extendedLocation;} {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIdentity.FromJson(__jsonIdentity) : _identity;} {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterProperties.FromJson(__jsonProperties) : _property;} + {_eTag = If( json?.PropertyT("eTag"), out var __jsonETag) ? (string)__jsonETag : (string)_eTag;} + {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)_kind;} AfterFromJson(json); } @@ -107,6 +109,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro AddIf( null != this._extendedLocation ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._extendedLocation.ToJson(null,serializationMode) : null, "extendedLocation" ,container.Add ); AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._eTag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._eTag.ToString()) : null, "eTag" ,container.Add ); + } + AddIf( null != (((object)this._kind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._kind.ToString()) : null, "kind" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAadProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAadProfile.PowerShell.cs index dbc9756e7c14..6f5dbd661eae 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAadProfile.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAadProfile.PowerShell.cs @@ -8,7 +8,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; /// - /// For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). + /// AADProfile specifies attributes for Azure Active Directory integration. For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). /// [System.ComponentModel.TypeConverter(typeof(ManagedClusterAadProfileTypeConverter))] public partial class ManagedClusterAadProfile @@ -204,7 +204,7 @@ public override string ToString() return ToJsonString(); } } - /// For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). + /// AADProfile specifies attributes for Azure Active Directory integration. For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). [System.ComponentModel.TypeConverter(typeof(ManagedClusterAadProfileTypeConverter))] public partial interface IManagedClusterAadProfile diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAadProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAadProfile.cs index 42b96be378a4..c6d5524e1f9b 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAadProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAadProfile.cs @@ -8,7 +8,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). + /// AADProfile specifies attributes for Azure Active Directory integration. For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). /// public partial class ManagedClusterAadProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAadProfile, @@ -78,7 +78,7 @@ public ManagedClusterAadProfile() } } - /// For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). + /// AADProfile specifies attributes for Azure Active Directory integration. For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). public partial interface IManagedClusterAadProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { @@ -169,7 +169,7 @@ public partial interface IManagedClusterAadProfile : string TenantId { get; set; } } - /// For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). + /// AADProfile specifies attributes for Azure Active Directory integration. For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). internal partial interface IManagedClusterAadProfileInternal { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAadProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAadProfile.json.cs index eb40840eab79..d1a2a228f7f1 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAadProfile.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAadProfile.json.cs @@ -8,7 +8,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). + /// AADProfile specifies attributes for Azure Active Directory integration. For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). /// public partial class ManagedClusterAadProfile { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAccessProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAccessProfile.cs index 0c4a061627ed..0b7b87b190f5 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAccessProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAccessProfile.cs @@ -19,7 +19,7 @@ public partial class ManagedClusterAccessProfile : private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrackedResource(); /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id; } @@ -36,34 +36,34 @@ public partial class ManagedClusterAccessProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAccessProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAccessProfileInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AccessProfile()); set { {_property = value;} } } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemData = value ?? null /* model class */; } /// Internal Acessors for SystemDataCreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// Internal Acessors for SystemDataCreatedBy - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } /// Internal Acessors for SystemDataCreatedByType - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? null; } /// Internal Acessors for SystemDataLastModifiedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// Internal Acessors for SystemDataLastModifiedBy - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } /// Internal Acessors for SystemDataLastModifiedByType - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Type = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAddonProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAddonProfile.cs index 9ca5dc9c517b..274e59a7d0c5 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAddonProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAddonProfile.cs @@ -50,13 +50,13 @@ public partial class ManagedClusterAddonProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAddonProfileIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAddonProfileInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAddonProfileIdentity()); set { {_identity = value;} } } /// Internal Acessors for IdentityClientId - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAddonProfileInternal.IdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ClientId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAddonProfileInternal.IdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ClientId = value ?? null; } /// Internal Acessors for IdentityObjectId - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAddonProfileInternal.IdentityObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ObjectId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAddonProfileInternal.IdentityObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ObjectId = value ?? null; } /// Internal Acessors for IdentityResourceId - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAddonProfileInternal.IdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ResourceId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAddonProfileInternal.IdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ResourceId = value ?? null; } /// Creates an new instance. public ManagedClusterAddonProfile() diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfile.PowerShell.cs index 4b656fbd8c6a..d50fcfbeb135 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfile.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfile.PowerShell.cs @@ -121,6 +121,22 @@ internal ManagedClusterAgentPoolProfile(global::System.Collections.IDictionary c { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge, global::System.Convert.ToString); } + if (content.Contains("UpgradeSettingMaxUnavailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxUnavailable = (string) content.GetValueForProperty("UpgradeSettingMaxUnavailable",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxUnavailable, global::System.Convert.ToString); + } + if (content.Contains("UpgradeSettingDrainTimeoutInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingDrainTimeoutInMinute = (int?) content.GetValueForProperty("UpgradeSettingDrainTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingDrainTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UpgradeSettingNodeSoakDurationInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingNodeSoakDurationInMinute = (int?) content.GetValueForProperty("UpgradeSettingNodeSoakDurationInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingNodeSoakDurationInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UpgradeSettingUndrainableNodeBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingUndrainableNodeBehavior = (string) content.GetValueForProperty("UpgradeSettingUndrainableNodeBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingUndrainableNodeBehavior, global::System.Convert.ToString); + } if (content.Contains("KubeletConfigCpuManagerPolicy")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy = (string) content.GetValueForProperty("KubeletConfigCpuManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy, global::System.Convert.ToString); @@ -185,6 +201,74 @@ internal ManagedClusterAgentPoolProfile(global::System.Collections.IDictionary c { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId, global::System.Convert.ToString); } + if (content.Contains("NetworkProfileNodePublicIPTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileNodePublicIPTag = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileNodePublicIPTag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileNodePublicIPTag, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPTagTypeConverter.ConvertFrom)); + } + if (content.Contains("NetworkProfileAllowedHostPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileAllowedHostPort = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileAllowedHostPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileAllowedHostPort, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PortRangeTypeConverter.ConvertFrom)); + } + if (content.Contains("NetworkProfileApplicationSecurityGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileApplicationSecurityGroup = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileApplicationSecurityGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileApplicationSecurityGroup, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("WindowProfileDisableOutboundNat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowProfileDisableOutboundNat = (bool?) content.GetValueForProperty("WindowProfileDisableOutboundNat",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowProfileDisableOutboundNat, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileEnableVtpm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableVtpm = (bool?) content.GetValueForProperty("SecurityProfileEnableVtpm",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableVtpm, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileEnableSecureBoot")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableSecureBoot = (bool?) content.GetValueForProperty("SecurityProfileEnableSecureBoot",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableSecureBoot, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileSshAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileSshAccess = (string) content.GetValueForProperty("SecurityProfileSshAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileSshAccess, global::System.Convert.ToString); + } + if (content.Contains("GpuProfileDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfileDriver = (string) content.GetValueForProperty("GpuProfileDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfileDriver, global::System.Convert.ToString); + } + if (content.Contains("GatewayProfilePublicIPPrefixSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfilePublicIPPrefixSize = (int?) content.GetValueForProperty("GatewayProfilePublicIPPrefixSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfilePublicIPPrefixSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VirtualMachineProfileScale")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineProfileScale = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile) content.GetValueForProperty("VirtualMachineProfileScale",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineProfileScale, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScaleProfileTypeConverter.ConvertFrom); + } + if (content.Contains("StatusProvisioningError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).StatusProvisioningError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("StatusProvisioningError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).StatusProvisioningError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("ScaleManual")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleManual = (System.Collections.Generic.List) content.GetValueForProperty("ScaleManual",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleManual, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManualScaleProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorCode = (string) content.GetValueForProperty("ProvisioningErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorMessage = (string) content.GetValueForProperty("ProvisioningErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorTarget = (string) content.GetValueForProperty("ProvisioningErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorTarget, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorDetail = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } if (content.Contains("UpgradeSetting")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolUpgradeSettingsTypeConverter.ConvertFrom); @@ -205,6 +289,38 @@ internal ManagedClusterAgentPoolProfile(global::System.Collections.IDictionary c { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CreationDataTypeConverter.ConvertFrom); } + if (content.Contains("NetworkProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolNetworkProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WindowsProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolWindowsProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("GpuProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile) content.GetValueForProperty("GpuProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.GpuProfileTypeConverter.ConvertFrom); + } + if (content.Contains("GatewayProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile) content.GetValueForProperty("GatewayProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolGatewayProfileTypeConverter.ConvertFrom); + } + if (content.Contains("VirtualMachinesProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachinesProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile) content.GetValueForProperty("VirtualMachinesProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachinesProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachinesProfileTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolStatusTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ETag, global::System.Convert.ToString); + } if (content.Contains("Count")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -229,6 +345,10 @@ internal ManagedClusterAgentPoolProfile(global::System.Collections.IDictionary c { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime = (string) content.GetValueForProperty("WorkloadRuntime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime, global::System.Convert.ToString); } + if (content.Contains("MessageOfTheDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MessageOfTheDay = (string) content.GetValueForProperty("MessageOfTheDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MessageOfTheDay, global::System.Convert.ToString); + } if (content.Contains("VnetSubnetId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId, global::System.Convert.ToString); @@ -237,6 +357,10 @@ internal ManagedClusterAgentPoolProfile(global::System.Collections.IDictionary c { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId = (string) content.GetValueForProperty("PodSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId, global::System.Convert.ToString); } + if (content.Contains("PodIPAllocationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodIPAllocationMode = (string) content.GetValueForProperty("PodIPAllocationMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodIPAllocationMode, global::System.Convert.ToString); + } if (content.Contains("MaxPod")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -345,10 +469,18 @@ internal ManagedClusterAgentPoolProfile(global::System.Collections.IDictionary c { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile = (string) content.GetValueForProperty("GpuInstanceProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile, global::System.Convert.ToString); } + if (content.Contains("CapacityReservationGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CapacityReservationGroupId = (string) content.GetValueForProperty("CapacityReservationGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CapacityReservationGroupId, global::System.Convert.ToString); + } if (content.Contains("HostGroupId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId = (string) content.GetValueForProperty("HostGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId, global::System.Convert.ToString); } + if (content.Contains("VirtualMachineNodesStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineNodesStatus = (System.Collections.Generic.List) content.GetValueForProperty("VirtualMachineNodesStatus",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineNodesStatus, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachineNodesTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } @@ -378,6 +510,22 @@ internal ManagedClusterAgentPoolProfile(global::System.Management.Automation.PSO { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge, global::System.Convert.ToString); } + if (content.Contains("UpgradeSettingMaxUnavailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxUnavailable = (string) content.GetValueForProperty("UpgradeSettingMaxUnavailable",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxUnavailable, global::System.Convert.ToString); + } + if (content.Contains("UpgradeSettingDrainTimeoutInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingDrainTimeoutInMinute = (int?) content.GetValueForProperty("UpgradeSettingDrainTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingDrainTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UpgradeSettingNodeSoakDurationInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingNodeSoakDurationInMinute = (int?) content.GetValueForProperty("UpgradeSettingNodeSoakDurationInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingNodeSoakDurationInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UpgradeSettingUndrainableNodeBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingUndrainableNodeBehavior = (string) content.GetValueForProperty("UpgradeSettingUndrainableNodeBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingUndrainableNodeBehavior, global::System.Convert.ToString); + } if (content.Contains("KubeletConfigCpuManagerPolicy")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy = (string) content.GetValueForProperty("KubeletConfigCpuManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy, global::System.Convert.ToString); @@ -442,6 +590,74 @@ internal ManagedClusterAgentPoolProfile(global::System.Management.Automation.PSO { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId, global::System.Convert.ToString); } + if (content.Contains("NetworkProfileNodePublicIPTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileNodePublicIPTag = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileNodePublicIPTag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileNodePublicIPTag, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPTagTypeConverter.ConvertFrom)); + } + if (content.Contains("NetworkProfileAllowedHostPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileAllowedHostPort = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileAllowedHostPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileAllowedHostPort, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PortRangeTypeConverter.ConvertFrom)); + } + if (content.Contains("NetworkProfileApplicationSecurityGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileApplicationSecurityGroup = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileApplicationSecurityGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileApplicationSecurityGroup, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("WindowProfileDisableOutboundNat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowProfileDisableOutboundNat = (bool?) content.GetValueForProperty("WindowProfileDisableOutboundNat",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowProfileDisableOutboundNat, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileEnableVtpm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableVtpm = (bool?) content.GetValueForProperty("SecurityProfileEnableVtpm",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableVtpm, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileEnableSecureBoot")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableSecureBoot = (bool?) content.GetValueForProperty("SecurityProfileEnableSecureBoot",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableSecureBoot, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileSshAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileSshAccess = (string) content.GetValueForProperty("SecurityProfileSshAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileSshAccess, global::System.Convert.ToString); + } + if (content.Contains("GpuProfileDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfileDriver = (string) content.GetValueForProperty("GpuProfileDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfileDriver, global::System.Convert.ToString); + } + if (content.Contains("GatewayProfilePublicIPPrefixSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfilePublicIPPrefixSize = (int?) content.GetValueForProperty("GatewayProfilePublicIPPrefixSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfilePublicIPPrefixSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VirtualMachineProfileScale")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineProfileScale = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile) content.GetValueForProperty("VirtualMachineProfileScale",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineProfileScale, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScaleProfileTypeConverter.ConvertFrom); + } + if (content.Contains("StatusProvisioningError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).StatusProvisioningError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("StatusProvisioningError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).StatusProvisioningError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("ScaleManual")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleManual = (System.Collections.Generic.List) content.GetValueForProperty("ScaleManual",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleManual, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManualScaleProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorCode = (string) content.GetValueForProperty("ProvisioningErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorMessage = (string) content.GetValueForProperty("ProvisioningErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorTarget = (string) content.GetValueForProperty("ProvisioningErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorTarget, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorDetail = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } if (content.Contains("UpgradeSetting")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolUpgradeSettingsTypeConverter.ConvertFrom); @@ -462,6 +678,38 @@ internal ManagedClusterAgentPoolProfile(global::System.Management.Automation.PSO { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CreationDataTypeConverter.ConvertFrom); } + if (content.Contains("NetworkProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolNetworkProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WindowsProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolWindowsProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("GpuProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile) content.GetValueForProperty("GpuProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.GpuProfileTypeConverter.ConvertFrom); + } + if (content.Contains("GatewayProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile) content.GetValueForProperty("GatewayProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolGatewayProfileTypeConverter.ConvertFrom); + } + if (content.Contains("VirtualMachinesProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachinesProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile) content.GetValueForProperty("VirtualMachinesProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachinesProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachinesProfileTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolStatusTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ETag, global::System.Convert.ToString); + } if (content.Contains("Count")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -486,6 +734,10 @@ internal ManagedClusterAgentPoolProfile(global::System.Management.Automation.PSO { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime = (string) content.GetValueForProperty("WorkloadRuntime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime, global::System.Convert.ToString); } + if (content.Contains("MessageOfTheDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MessageOfTheDay = (string) content.GetValueForProperty("MessageOfTheDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MessageOfTheDay, global::System.Convert.ToString); + } if (content.Contains("VnetSubnetId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId, global::System.Convert.ToString); @@ -494,6 +746,10 @@ internal ManagedClusterAgentPoolProfile(global::System.Management.Automation.PSO { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId = (string) content.GetValueForProperty("PodSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId, global::System.Convert.ToString); } + if (content.Contains("PodIPAllocationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodIPAllocationMode = (string) content.GetValueForProperty("PodIPAllocationMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodIPAllocationMode, global::System.Convert.ToString); + } if (content.Contains("MaxPod")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -602,10 +858,18 @@ internal ManagedClusterAgentPoolProfile(global::System.Management.Automation.PSO { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile = (string) content.GetValueForProperty("GpuInstanceProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile, global::System.Convert.ToString); } + if (content.Contains("CapacityReservationGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CapacityReservationGroupId = (string) content.GetValueForProperty("CapacityReservationGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CapacityReservationGroupId, global::System.Convert.ToString); + } if (content.Contains("HostGroupId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId = (string) content.GetValueForProperty("HostGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId, global::System.Convert.ToString); } + if (content.Contains("VirtualMachineNodesStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineNodesStatus = (System.Collections.Generic.List) content.GetValueForProperty("VirtualMachineNodesStatus",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineNodesStatus, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachineNodesTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfile.cs index a25f886f6e97..308cfb1e3acd 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfile.cs @@ -25,6 +25,12 @@ public partial class ManagedClusterAgentPoolProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public System.Collections.Generic.List AvailabilityZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).AvailabilityZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).AvailabilityZone = value ?? null /* arrayOf */; } + /// + /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string CapacityReservationGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CapacityReservationGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CapacityReservationGroupId = value ?? null; } + /// /// 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. @@ -43,33 +49,43 @@ public partial class ManagedClusterAgentPoolProfile : public string CreationDataSourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CreationDataSourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CreationDataSourceResourceId = value ?? null; } /// - /// If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion - /// is , this field will contain the full version being used. + /// The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version , + /// this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full + /// version being used. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string CurrentOrchestratorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CurrentOrchestratorVersion; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ETag; } + /// Whether to enable auto-scaler [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public bool? EnableAutoScaling { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableAutoScaling; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableAutoScaling = value ?? default(bool); } /// - /// This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption + /// Whether to enable host based OS and data drive encryption. This is only supported on certain VM sizes and in certain Azure + /// regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public bool? EnableEncryptionAtHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableEncryptionAtHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableEncryptionAtHost = value ?? default(bool); } /// - /// See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + /// Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) /// for more details. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public bool? EnableFips { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableFips; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableFips = value ?? default(bool); } /// - /// Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario - /// is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. - /// For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + /// Whether each node is allocated its own public IP. Some scenarios may require nodes in a node pool to receive their own + /// dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection + /// to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). /// The default is false. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] @@ -79,14 +95,39 @@ public partial class ManagedClusterAgentPoolProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public bool? EnableUltraSsd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableUltraSsd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableUltraSsd = value ?? default(bool); } + /// + /// Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not Gateway. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile GatewayProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GatewayProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GatewayProfile = value ?? null /* model class */; } + + /// + /// The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size + /// of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. + /// The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, + /// the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default + /// value is 31. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public int? GatewayProfilePublicIPPrefixSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GatewayProfilePublicIPPrefixSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GatewayProfilePublicIPPrefixSize = value ?? default(int); } + /// /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string GpuInstanceProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GpuInstanceProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GpuInstanceProfile = value ?? null; } + /// GPU settings for the Agent Pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile GpuProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GpuProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GpuProfile = value ?? null /* model class */; } + + /// Whether to install GPU drivers. When it's not specified, default is Install. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string GpuProfileDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GpuProfileDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GpuProfileDriver = value ?? null; } + /// - /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// The fully qualified resource ID of the Dedicated Host Group to provision virtual machines from, used only in creation + /// scenario and not allowed to changed once set. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. /// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] @@ -110,19 +151,21 @@ public partial class ManagedClusterAgentPoolProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public int? KubeletConfigContainerLogMaxSizeMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigContainerLogMaxSizeMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigContainerLogMaxSizeMb = value ?? default(int); } - /// The default is true. + /// + /// If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public bool? KubeletConfigCpuCfsQuota { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigCpuCfsQuota; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigCpuCfsQuota = value ?? default(bool); } /// - /// The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For - /// example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + /// The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an optional + /// fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string KubeletConfigCpuCfsQuotaPeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigCpuCfsQuotaPeriod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigCpuCfsQuotaPeriod = value ?? null; } /// - /// The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + /// The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) /// for more information. Allowed values are 'none' and 'static'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] @@ -134,11 +177,17 @@ public partial class ManagedClusterAgentPoolProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public bool? KubeletConfigFailSwapOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigFailSwapOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigFailSwapOn = value ?? default(bool); } - /// To disable image garbage collection, set to 100. The default is 85% + /// + /// The percent of disk usage after which image garbage collection is always run. To disable image garbage collection, set + /// to 100. The default is 85% + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public int? KubeletConfigImageGcHighThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigImageGcHighThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigImageGcHighThreshold = value ?? default(int); } - /// This cannot be set higher than imageGcHighThreshold. The default is 80% + /// + /// The percent of disk usage before which image garbage collection is never run. This cannot be set higher than imageGcHighThreshold. + /// The default is 80% + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public int? KubeletConfigImageGcLowThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigImageGcLowThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigImageGcLowThreshold = value ?? default(int); } @@ -147,7 +196,7 @@ public partial class ManagedClusterAgentPoolProfile : public int? KubeletConfigPodMaxPid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigPodMaxPid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigPodMaxPid = value ?? default(int); } /// - /// For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). + /// The Topology Manager policy to use. For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). /// The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] @@ -172,14 +221,16 @@ public partial class ManagedClusterAgentPoolProfile : public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISysctlConfig LinuxOSConfigSysctl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfigSysctl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfigSysctl = value ?? null /* model class */; } /// - /// Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information - /// see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values are + /// 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent + /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string LinuxOSConfigTransparentHugePageDefrag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfigTransparentHugePageDefrag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfigTransparentHugePageDefrag = value ?? null; } /// - /// Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is 'always'. + /// For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string LinuxOSConfigTransparentHugePageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfigTransparentHugePageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfigTransparentHugePageEnabled = value ?? null; } @@ -192,37 +243,90 @@ public partial class ManagedClusterAgentPoolProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public int? MaxPod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MaxPod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MaxPod = value ?? default(int); } + /// + /// Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. + /// This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must + /// be a static string (i.e., will be printed raw and not be executed as a script). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string MessageOfTheDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MessageOfTheDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MessageOfTheDay = value ?? null; } + /// Internal Acessors for CreationData - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICreationData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.CreationData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CreationData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CreationData = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICreationData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.CreationData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CreationData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CreationData = value ?? null /* model class */; } /// Internal Acessors for CurrentOrchestratorVersion - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.CurrentOrchestratorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CurrentOrchestratorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CurrentOrchestratorVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.CurrentOrchestratorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CurrentOrchestratorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CurrentOrchestratorVersion = value ?? null; } + + /// Internal Acessors for ETag + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ETag = value ?? null; } + + /// Internal Acessors for GatewayProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.GatewayProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GatewayProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GatewayProfile = value ?? null /* model class */; } + + /// Internal Acessors for GpuProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.GpuProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GpuProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GpuProfile = value ?? null /* model class */; } /// Internal Acessors for KubeletConfig - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.KubeletConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfig = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.KubeletConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfig = value ?? null /* model class */; } /// Internal Acessors for LinuxOSConfig - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ILinuxOSConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.LinuxOSConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfig = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ILinuxOSConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.LinuxOSConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfig = value ?? null /* model class */; } + + /// Internal Acessors for NetworkProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.NetworkProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NetworkProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NetworkProfile = value ?? null /* model class */; } /// Internal Acessors for NodeImageVersion - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.NodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeImageVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeImageVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.NodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeImageVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeImageVersion = value ?? null; } /// Internal Acessors for PowerState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerState = value ?? null /* model class */; } + + /// Internal Acessors for ProvisioningErrorAdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningErrorAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorAdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorAdditionalInfo = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningErrorCode + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorCode = value ?? null; } + + /// Internal Acessors for ProvisioningErrorDetail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorDetail = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningErrorMessage + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorMessage = value ?? null; } + + /// Internal Acessors for ProvisioningErrorTarget + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorTarget = value ?? null; } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningState = value ?? null; } + + /// Internal Acessors for SecurityProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.SecurityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SecurityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SecurityProfile = value ?? null /* model class */; } + + /// Internal Acessors for Status + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Status = value ?? null /* model class */; } + + /// Internal Acessors for StatusProvisioningError + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.StatusProvisioningError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).StatusProvisioningError; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).StatusProvisioningError = value ?? null /* model class */; } /// Internal Acessors for UpgradeSetting - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettings Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.UpgradeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSetting = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettings Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.UpgradeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSetting = value ?? null /* model class */; } + + /// Internal Acessors for VirtualMachineProfileScale + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.VirtualMachineProfileScale { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VirtualMachineProfileScale; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VirtualMachineProfileScale = value ?? null /* model class */; } + + /// Internal Acessors for VirtualMachinesProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.VirtualMachinesProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VirtualMachinesProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VirtualMachinesProfile = value ?? null /* model class */; } + + /// Internal Acessors for WindowsProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.WindowsProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).WindowsProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).WindowsProfile = value ?? null /* model class */; } /// The minimum number of nodes for auto-scaling [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public int? MinCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MinCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MinCount = value ?? default(int); } /// - /// A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions - /// and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools + /// The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information + /// on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string Mode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Mode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Mode = value ?? null; } @@ -230,10 +334,33 @@ public partial class ManagedClusterAgentPoolProfile : /// Backing field for property. private string _name; - /// Windows agent pool names must be 6 characters or less. + /// + /// Unique name of the agent pool profile in the context of the subscription and resource group. Windows agent pool names + /// must be 6 characters or less. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Name { get => this._name; set => this._name = value; } + /// Network-related settings of an agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile NetworkProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NetworkProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NetworkProfile = value ?? null /* model class */; } + + /// + /// The port ranges that are allowed to access. The specified ranges are allowed to overlap. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public System.Collections.Generic.List NetworkProfileAllowedHostPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NetworkProfileAllowedHostPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NetworkProfileAllowedHostPort = value ?? null /* arrayOf */; } + + /// + /// The IDs of the application security groups which agent pool will associate when created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public System.Collections.Generic.List NetworkProfileApplicationSecurityGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NetworkProfileApplicationSecurityGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NetworkProfileApplicationSecurityGroup = value ?? null /* arrayOf */; } + + /// IPTags of instance-level public IPs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public System.Collections.Generic.List NetworkProfileNodePublicIPTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NetworkProfileNodePublicIPTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NetworkProfileNodePublicIPTag = value ?? null /* arrayOf */; } + /// The version of node image [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string NodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeImageVersion; } @@ -243,7 +370,7 @@ public partial class ManagedClusterAgentPoolProfile : public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeLabel = value ?? null /* model class */; } /// - /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// The public IP prefix ID which VM nodes should use IPs from. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string NodePublicIPPrefixId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodePublicIPPrefixId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodePublicIPPrefixId = value ?? null; } @@ -262,8 +389,9 @@ public partial class ManagedClusterAgentPoolProfile : public int? OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSDiskSizeGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSDiskSizeGb = value ?? default(int); } /// - /// The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, - /// defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + /// The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has a + /// cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. + /// For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string OSDiskType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSDiskType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSDiskType = value ?? null; } @@ -280,28 +408,35 @@ public partial class ManagedClusterAgentPoolProfile : public string OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSType = value ?? null; } /// - /// Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When - /// is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same - /// once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. - /// As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool - /// version must have the same major version as the control plane. The node pool minor version must be within two minor versions - /// of the control plane version. The node pool version cannot be greater than the control plane version. For more information - /// see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + /// The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + /// (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. + /// Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, + /// even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to + /// the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool + /// minor version must be within two minor versions of the control plane version. The node pool version cannot be greater + /// than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string OrchestratorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OrchestratorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OrchestratorVersion = value ?? null; } /// - /// If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default + /// is 'DynamicIndividual'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string PodIPAllocationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PodIPAllocationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PodIPAllocationMode = value ?? null; } + + /// + /// The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node subnet + /// (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string PodSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PodSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PodSubnetId = value ?? null; } /// - /// When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. - /// A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it - /// is Running and provisioning state is Succeeded + /// Whether the Agent Pool is running or stopped. When an Agent Pool is first created it is initially Running. The Agent Pool + /// can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing + /// charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerState = value ?? null /* model class */; } @@ -310,6 +445,26 @@ public partial class ManagedClusterAgentPoolProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerStateCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerStateCode = value ?? null; } + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorAdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string ProvisioningErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorCode; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public System.Collections.Generic.List ProvisioningErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorDetail; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string ProvisioningErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorMessage; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string ProvisioningErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningErrorTarget; } + /// The current deployment or provisioning state. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningState; } @@ -319,13 +474,19 @@ public partial class ManagedClusterAgentPoolProfile : public string ProximityPlacementGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProximityPlacementGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProximityPlacementGroupId = value ?? null; } /// - /// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. + /// The scale down mode to use when scaling the Agent Pool. This also effects the cluster autoscaler behavior. If not specified, + /// it defaults to Delete. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string ScaleDownMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleDownMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleDownMode = value ?? null; } + /// Specifications on how to scale the VirtualMachines agent pool to a fixed size. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public System.Collections.Generic.List ScaleManual { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleManual; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleManual = value ?? null /* arrayOf */; } + /// - /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// 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'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string ScaleSetEvictionPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleSetEvictionPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleSetEvictionPolicy = value ?? null; } @@ -336,13 +497,48 @@ public partial class ManagedClusterAgentPoolProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string ScaleSetPriority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleSetPriority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleSetPriority = value ?? null; } + /// The security settings of an agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile SecurityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SecurityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SecurityProfile = value ?? null /* model class */; } + /// - /// Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. - /// For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + /// Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For + /// more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public bool? SecurityProfileEnableSecureBoot { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SecurityProfileEnableSecureBoot; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SecurityProfileEnableSecureBoot = value ?? default(bool); } + + /// + /// vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the + /// node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public bool? SecurityProfileEnableVtpm { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SecurityProfileEnableVtpm; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SecurityProfileEnableVtpm = value ?? default(bool); } + + /// SSH access method of an agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SecurityProfileSshAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SecurityProfileSshAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SecurityProfileSshAccess = value ?? null; } + + /// + /// The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value greater + /// than zero or -1 which indicates default price to be up-to on-demand. Possible values are any decimal value greater than + /// zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs + /// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public float? SpotMaxPrice { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SpotMaxPrice; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SpotMaxPrice = value ?? default(float); } + /// Contains read-only information about the Agent Pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Status = value ?? null /* model class */; } + + /// + /// The error detail information of the agent pool. Preserves the detailed info of failure. If there was no error, this field + /// is omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail StatusProvisioningError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).StatusProvisioningError; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).StatusProvisioningError = value ?? null /* model class */; } + /// The tags to be persisted on the agent pool virtual machine scale set. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Tag = value ?? null /* model class */; } @@ -356,27 +552,84 @@ public partial class ManagedClusterAgentPoolProfile : internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettings UpgradeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSetting = value ?? null /* model class */; } /// - /// This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the - /// percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. - /// If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade + /// The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per + /// node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If + /// not specified, the default is 30 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public int? UpgradeSettingDrainTimeoutInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSettingDrainTimeoutInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSettingDrainTimeoutInMinute = value ?? default(int); } + + /// + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') + /// or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time + /// of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + /// including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string UpgradeSettingMaxSurge { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSettingMaxSurge; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSettingMaxSurge = value ?? null; } /// - /// 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 + /// The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set + /// to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total + /// agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default + /// is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string UpgradeSettingMaxUnavailable { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSettingMaxUnavailable; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSettingMaxUnavailable = value ?? null; } + + /// + /// The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and + /// moving on to next node. If not specified, the default is 0 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public int? UpgradeSettingNodeSoakDurationInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSettingNodeSoakDurationInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSettingNodeSoakDurationInMinute = value ?? default(int); } + + /// + /// Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption + /// Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout + /// or pod is still being in a running state, can also cause undrainable nodes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string UpgradeSettingUndrainableNodeBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSettingUndrainableNodeBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSettingUndrainableNodeBehavior = value ?? null; } + + /// + /// 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 /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string VMSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VMSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VMSize = value ?? null; } + /// The status of nodes in a VirtualMachines agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public System.Collections.Generic.List VirtualMachineNodesStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VirtualMachineNodesStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VirtualMachineNodesStatus = value ?? null /* arrayOf */; } + + /// Specifications on how to scale a VirtualMachines agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile VirtualMachineProfileScale { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VirtualMachineProfileScale; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VirtualMachineProfileScale = value ?? null /* model class */; } + + /// Specifications on VirtualMachines agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile VirtualMachinesProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VirtualMachinesProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VirtualMachinesProfile = value ?? null /* model class */; } + /// - /// If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to - /// nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// The ID of the subnet which agent pool nodes and optionally pods will join on startup. If this is not specified, a VNET + /// and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies + /// to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string VnetSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VnetSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VnetSubnetId = value ?? null; } + /// + /// Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if the + /// cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public bool? WindowProfileDisableOutboundNat { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).WindowProfileDisableOutboundNat; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).WindowProfileDisableOutboundNat = value ?? default(bool); } + + /// The Windows agent pool's specific profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile WindowsProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).WindowsProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).WindowsProfile = value ?? null /* model class */; } + /// Determines the type of workload a node can run. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string WorkloadRuntime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).WorkloadRuntime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).WorkloadRuntime = value ?? null; } @@ -404,14 +657,17 @@ public partial interface IManagedClusterAgentPoolProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfileProperties { - /// Windows agent pool names must be 6 characters or less. + /// + /// Unique name of the agent pool profile in the context of the subscription and resource group. Windows agent pool names + /// must be 6 characters or less. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Windows agent pool names must be 6 characters or less.", + Description = @"Unique name of the agent pool profile in the context of the subscription and resource group. Windows agent pool names must be 6 characters or less.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; set; } @@ -421,7 +677,10 @@ public partial interface IManagedClusterAgentPoolProfile : internal partial interface IManagedClusterAgentPoolProfileInternal : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal { - /// Windows agent pool names must be 6 characters or less. + /// + /// Unique name of the agent pool profile in the context of the subscription and resource group. Windows agent pool names + /// must be 6 characters or less. + /// string Name { get; set; } } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfileProperties.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfileProperties.PowerShell.cs index 260fc4bcf68c..417faa260301 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfileProperties.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfileProperties.PowerShell.cs @@ -132,6 +132,38 @@ internal ManagedClusterAgentPoolProfileProperties(global::System.Collections.IDi { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CreationDataTypeConverter.ConvertFrom); } + if (content.Contains("NetworkProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolNetworkProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WindowsProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolWindowsProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("GpuProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile) content.GetValueForProperty("GpuProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.GpuProfileTypeConverter.ConvertFrom); + } + if (content.Contains("GatewayProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile) content.GetValueForProperty("GatewayProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolGatewayProfileTypeConverter.ConvertFrom); + } + if (content.Contains("VirtualMachinesProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachinesProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile) content.GetValueForProperty("VirtualMachinesProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachinesProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachinesProfileTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolStatusTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ETag, global::System.Convert.ToString); + } if (content.Contains("Count")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -156,6 +188,10 @@ internal ManagedClusterAgentPoolProfileProperties(global::System.Collections.IDi { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime = (string) content.GetValueForProperty("WorkloadRuntime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime, global::System.Convert.ToString); } + if (content.Contains("MessageOfTheDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MessageOfTheDay = (string) content.GetValueForProperty("MessageOfTheDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MessageOfTheDay, global::System.Convert.ToString); + } if (content.Contains("VnetSubnetId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId, global::System.Convert.ToString); @@ -164,6 +200,10 @@ internal ManagedClusterAgentPoolProfileProperties(global::System.Collections.IDi { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId = (string) content.GetValueForProperty("PodSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId, global::System.Convert.ToString); } + if (content.Contains("PodIPAllocationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodIPAllocationMode = (string) content.GetValueForProperty("PodIPAllocationMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodIPAllocationMode, global::System.Convert.ToString); + } if (content.Contains("MaxPod")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -272,10 +312,18 @@ internal ManagedClusterAgentPoolProfileProperties(global::System.Collections.IDi { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile = (string) content.GetValueForProperty("GpuInstanceProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile, global::System.Convert.ToString); } + if (content.Contains("CapacityReservationGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CapacityReservationGroupId = (string) content.GetValueForProperty("CapacityReservationGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CapacityReservationGroupId, global::System.Convert.ToString); + } if (content.Contains("HostGroupId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId = (string) content.GetValueForProperty("HostGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId, global::System.Convert.ToString); } + if (content.Contains("VirtualMachineNodesStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineNodesStatus = (System.Collections.Generic.List) content.GetValueForProperty("VirtualMachineNodesStatus",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineNodesStatus, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachineNodesTypeConverter.ConvertFrom)); + } if (content.Contains("PowerStateCode")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode = (string) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode, global::System.Convert.ToString); @@ -284,6 +332,22 @@ internal ManagedClusterAgentPoolProfileProperties(global::System.Collections.IDi { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge, global::System.Convert.ToString); } + if (content.Contains("UpgradeSettingMaxUnavailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxUnavailable = (string) content.GetValueForProperty("UpgradeSettingMaxUnavailable",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxUnavailable, global::System.Convert.ToString); + } + if (content.Contains("UpgradeSettingDrainTimeoutInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingDrainTimeoutInMinute = (int?) content.GetValueForProperty("UpgradeSettingDrainTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingDrainTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UpgradeSettingNodeSoakDurationInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingNodeSoakDurationInMinute = (int?) content.GetValueForProperty("UpgradeSettingNodeSoakDurationInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingNodeSoakDurationInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UpgradeSettingUndrainableNodeBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingUndrainableNodeBehavior = (string) content.GetValueForProperty("UpgradeSettingUndrainableNodeBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingUndrainableNodeBehavior, global::System.Convert.ToString); + } if (content.Contains("KubeletConfigCpuManagerPolicy")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy = (string) content.GetValueForProperty("KubeletConfigCpuManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy, global::System.Convert.ToString); @@ -348,6 +412,74 @@ internal ManagedClusterAgentPoolProfileProperties(global::System.Collections.IDi { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId, global::System.Convert.ToString); } + if (content.Contains("NetworkProfileNodePublicIPTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileNodePublicIPTag = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileNodePublicIPTag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileNodePublicIPTag, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPTagTypeConverter.ConvertFrom)); + } + if (content.Contains("NetworkProfileAllowedHostPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileAllowedHostPort = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileAllowedHostPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileAllowedHostPort, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PortRangeTypeConverter.ConvertFrom)); + } + if (content.Contains("NetworkProfileApplicationSecurityGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileApplicationSecurityGroup = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileApplicationSecurityGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileApplicationSecurityGroup, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("WindowProfileDisableOutboundNat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowProfileDisableOutboundNat = (bool?) content.GetValueForProperty("WindowProfileDisableOutboundNat",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowProfileDisableOutboundNat, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileEnableVtpm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableVtpm = (bool?) content.GetValueForProperty("SecurityProfileEnableVtpm",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableVtpm, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileEnableSecureBoot")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableSecureBoot = (bool?) content.GetValueForProperty("SecurityProfileEnableSecureBoot",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableSecureBoot, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileSshAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileSshAccess = (string) content.GetValueForProperty("SecurityProfileSshAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileSshAccess, global::System.Convert.ToString); + } + if (content.Contains("GpuProfileDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfileDriver = (string) content.GetValueForProperty("GpuProfileDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfileDriver, global::System.Convert.ToString); + } + if (content.Contains("GatewayProfilePublicIPPrefixSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfilePublicIPPrefixSize = (int?) content.GetValueForProperty("GatewayProfilePublicIPPrefixSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfilePublicIPPrefixSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VirtualMachineProfileScale")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineProfileScale = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile) content.GetValueForProperty("VirtualMachineProfileScale",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineProfileScale, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScaleProfileTypeConverter.ConvertFrom); + } + if (content.Contains("StatusProvisioningError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).StatusProvisioningError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("StatusProvisioningError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).StatusProvisioningError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("ScaleManual")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleManual = (System.Collections.Generic.List) content.GetValueForProperty("ScaleManual",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleManual, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManualScaleProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorCode = (string) content.GetValueForProperty("ProvisioningErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorMessage = (string) content.GetValueForProperty("ProvisioningErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorTarget = (string) content.GetValueForProperty("ProvisioningErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorTarget, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorDetail = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } @@ -385,6 +517,38 @@ internal ManagedClusterAgentPoolProfileProperties(global::System.Management.Auto { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CreationDataTypeConverter.ConvertFrom); } + if (content.Contains("NetworkProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolNetworkProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WindowsProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolWindowsProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("GpuProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile) content.GetValueForProperty("GpuProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.GpuProfileTypeConverter.ConvertFrom); + } + if (content.Contains("GatewayProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile) content.GetValueForProperty("GatewayProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolGatewayProfileTypeConverter.ConvertFrom); + } + if (content.Contains("VirtualMachinesProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachinesProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile) content.GetValueForProperty("VirtualMachinesProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachinesProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachinesProfileTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolStatusTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ETag, global::System.Convert.ToString); + } if (content.Contains("Count")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -409,6 +573,10 @@ internal ManagedClusterAgentPoolProfileProperties(global::System.Management.Auto { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime = (string) content.GetValueForProperty("WorkloadRuntime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime, global::System.Convert.ToString); } + if (content.Contains("MessageOfTheDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MessageOfTheDay = (string) content.GetValueForProperty("MessageOfTheDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MessageOfTheDay, global::System.Convert.ToString); + } if (content.Contains("VnetSubnetId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId, global::System.Convert.ToString); @@ -417,6 +585,10 @@ internal ManagedClusterAgentPoolProfileProperties(global::System.Management.Auto { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId = (string) content.GetValueForProperty("PodSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId, global::System.Convert.ToString); } + if (content.Contains("PodIPAllocationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodIPAllocationMode = (string) content.GetValueForProperty("PodIPAllocationMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodIPAllocationMode, global::System.Convert.ToString); + } if (content.Contains("MaxPod")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -525,10 +697,18 @@ internal ManagedClusterAgentPoolProfileProperties(global::System.Management.Auto { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile = (string) content.GetValueForProperty("GpuInstanceProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile, global::System.Convert.ToString); } + if (content.Contains("CapacityReservationGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CapacityReservationGroupId = (string) content.GetValueForProperty("CapacityReservationGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CapacityReservationGroupId, global::System.Convert.ToString); + } if (content.Contains("HostGroupId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId = (string) content.GetValueForProperty("HostGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId, global::System.Convert.ToString); } + if (content.Contains("VirtualMachineNodesStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineNodesStatus = (System.Collections.Generic.List) content.GetValueForProperty("VirtualMachineNodesStatus",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineNodesStatus, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachineNodesTypeConverter.ConvertFrom)); + } if (content.Contains("PowerStateCode")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode = (string) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode, global::System.Convert.ToString); @@ -537,6 +717,22 @@ internal ManagedClusterAgentPoolProfileProperties(global::System.Management.Auto { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge, global::System.Convert.ToString); } + if (content.Contains("UpgradeSettingMaxUnavailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxUnavailable = (string) content.GetValueForProperty("UpgradeSettingMaxUnavailable",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxUnavailable, global::System.Convert.ToString); + } + if (content.Contains("UpgradeSettingDrainTimeoutInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingDrainTimeoutInMinute = (int?) content.GetValueForProperty("UpgradeSettingDrainTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingDrainTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UpgradeSettingNodeSoakDurationInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingNodeSoakDurationInMinute = (int?) content.GetValueForProperty("UpgradeSettingNodeSoakDurationInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingNodeSoakDurationInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UpgradeSettingUndrainableNodeBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingUndrainableNodeBehavior = (string) content.GetValueForProperty("UpgradeSettingUndrainableNodeBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingUndrainableNodeBehavior, global::System.Convert.ToString); + } if (content.Contains("KubeletConfigCpuManagerPolicy")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy = (string) content.GetValueForProperty("KubeletConfigCpuManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy, global::System.Convert.ToString); @@ -601,6 +797,74 @@ internal ManagedClusterAgentPoolProfileProperties(global::System.Management.Auto { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId, global::System.Convert.ToString); } + if (content.Contains("NetworkProfileNodePublicIPTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileNodePublicIPTag = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileNodePublicIPTag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileNodePublicIPTag, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPTagTypeConverter.ConvertFrom)); + } + if (content.Contains("NetworkProfileAllowedHostPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileAllowedHostPort = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileAllowedHostPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileAllowedHostPort, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PortRangeTypeConverter.ConvertFrom)); + } + if (content.Contains("NetworkProfileApplicationSecurityGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileApplicationSecurityGroup = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileApplicationSecurityGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).NetworkProfileApplicationSecurityGroup, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("WindowProfileDisableOutboundNat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowProfileDisableOutboundNat = (bool?) content.GetValueForProperty("WindowProfileDisableOutboundNat",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).WindowProfileDisableOutboundNat, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileEnableVtpm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableVtpm = (bool?) content.GetValueForProperty("SecurityProfileEnableVtpm",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableVtpm, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileEnableSecureBoot")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableSecureBoot = (bool?) content.GetValueForProperty("SecurityProfileEnableSecureBoot",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileEnableSecureBoot, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityProfileSshAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileSshAccess = (string) content.GetValueForProperty("SecurityProfileSshAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).SecurityProfileSshAccess, global::System.Convert.ToString); + } + if (content.Contains("GpuProfileDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfileDriver = (string) content.GetValueForProperty("GpuProfileDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuProfileDriver, global::System.Convert.ToString); + } + if (content.Contains("GatewayProfilePublicIPPrefixSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfilePublicIPPrefixSize = (int?) content.GetValueForProperty("GatewayProfilePublicIPPrefixSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).GatewayProfilePublicIPPrefixSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VirtualMachineProfileScale")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineProfileScale = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile) content.GetValueForProperty("VirtualMachineProfileScale",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).VirtualMachineProfileScale, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScaleProfileTypeConverter.ConvertFrom); + } + if (content.Contains("StatusProvisioningError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).StatusProvisioningError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("StatusProvisioningError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).StatusProvisioningError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("ScaleManual")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleManual = (System.Collections.Generic.List) content.GetValueForProperty("ScaleManual",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleManual, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManualScaleProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorCode = (string) content.GetValueForProperty("ProvisioningErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorMessage = (string) content.GetValueForProperty("ProvisioningErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorTarget = (string) content.GetValueForProperty("ProvisioningErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorTarget, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorDetail = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningErrorAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfileProperties.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfileProperties.cs index 31d605f207b6..f9162d5917a9 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfileProperties.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfileProperties.cs @@ -22,6 +22,15 @@ public partial class ManagedClusterAgentPoolProfileProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public System.Collections.Generic.List AvailabilityZone { get => this._availabilityZone; set => this._availabilityZone = value; } + /// Backing field for property. + private string _capacityReservationGroupId; + + /// + /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string CapacityReservationGroupId { get => this._capacityReservationGroupId; set => this._capacityReservationGroupId = value; } + /// Backing field for property. private int? _count; @@ -49,12 +58,24 @@ public partial class ManagedClusterAgentPoolProfileProperties : private string _currentOrchestratorVersion; /// - /// If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion - /// is , this field will contain the full version being used. + /// The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version , + /// this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full + /// version being used. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string CurrentOrchestratorVersion { get => this._currentOrchestratorVersion; } + /// Backing field for property. + private string _eTag; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ETag { get => this._eTag; } + /// Backing field for property. private bool? _enableAutoScaling; @@ -66,7 +87,8 @@ public partial class ManagedClusterAgentPoolProfileProperties : private bool? _enableEncryptionAtHost; /// - /// This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption + /// Whether to enable host based OS and data drive encryption. This is only supported on certain VM sizes and in certain Azure + /// regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public bool? EnableEncryptionAtHost { get => this._enableEncryptionAtHost; set => this._enableEncryptionAtHost = value; } @@ -75,7 +97,7 @@ public partial class ManagedClusterAgentPoolProfileProperties : private bool? _enableFips; /// - /// See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + /// Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) /// for more details. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] @@ -85,9 +107,9 @@ public partial class ManagedClusterAgentPoolProfileProperties : private bool? _enableNodePublicIP; /// - /// Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario - /// is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. - /// For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + /// Whether each node is allocated its own public IP. Some scenarios may require nodes in a node pool to receive their own + /// dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection + /// to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). /// The default is false. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] @@ -100,6 +122,25 @@ public partial class ManagedClusterAgentPoolProfileProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public bool? EnableUltraSsd { get => this._enableUltraSsd; set => this._enableUltraSsd = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile _gatewayProfile; + + /// + /// Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not Gateway. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile GatewayProfile { get => (this._gatewayProfile = this._gatewayProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolGatewayProfile()); set => this._gatewayProfile = value; } + + /// + /// The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size + /// of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. + /// The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, + /// the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default + /// value is 31. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? GatewayProfilePublicIPPrefixSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfileInternal)GatewayProfile).PublicIPPrefixSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfileInternal)GatewayProfile).PublicIPPrefixSize = value ?? default(int); } + /// Backing field for property. private string _gpuInstanceProfile; @@ -109,11 +150,23 @@ public partial class ManagedClusterAgentPoolProfileProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string GpuInstanceProfile { get => this._gpuInstanceProfile; set => this._gpuInstanceProfile = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile _gpuProfile; + + /// GPU settings for the Agent Pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile GpuProfile { get => (this._gpuProfile = this._gpuProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.GpuProfile()); set => this._gpuProfile = value; } + + /// Whether to install GPU drivers. When it's not specified, default is Install. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string GpuProfileDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfileInternal)GpuProfile).Driver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfileInternal)GpuProfile).Driver = value ?? null; } + /// Backing field for property. private string _hostGroupId; /// - /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// The fully qualified resource ID of the Dedicated Host Group to provision virtual machines from, used only in creation + /// scenario and not allowed to changed once set. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. /// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] @@ -140,19 +193,21 @@ public partial class ManagedClusterAgentPoolProfileProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public int? KubeletConfigContainerLogMaxSizeMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfigInternal)KubeletConfig).ContainerLogMaxSizeMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfigInternal)KubeletConfig).ContainerLogMaxSizeMb = value ?? default(int); } - /// The default is true. + /// + /// If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? KubeletConfigCpuCfsQuota { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfigInternal)KubeletConfig).CpuCfsQuota; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfigInternal)KubeletConfig).CpuCfsQuota = value ?? default(bool); } /// - /// The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For - /// example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + /// The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an optional + /// fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string KubeletConfigCpuCfsQuotaPeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfigInternal)KubeletConfig).CpuCfsQuotaPeriod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfigInternal)KubeletConfig).CpuCfsQuotaPeriod = value ?? null; } /// - /// The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + /// The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) /// for more information. Allowed values are 'none' and 'static'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] @@ -164,11 +219,17 @@ public partial class ManagedClusterAgentPoolProfileProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? KubeletConfigFailSwapOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfigInternal)KubeletConfig).FailSwapOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfigInternal)KubeletConfig).FailSwapOn = value ?? default(bool); } - /// To disable image garbage collection, set to 100. The default is 85% + /// + /// The percent of disk usage after which image garbage collection is always run. To disable image garbage collection, set + /// to 100. The default is 85% + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public int? KubeletConfigImageGcHighThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfigInternal)KubeletConfig).ImageGcHighThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfigInternal)KubeletConfig).ImageGcHighThreshold = value ?? default(int); } - /// This cannot be set higher than imageGcHighThreshold. The default is 80% + /// + /// The percent of disk usage before which image garbage collection is never run. This cannot be set higher than imageGcHighThreshold. + /// The default is 80% + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public int? KubeletConfigImageGcLowThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfigInternal)KubeletConfig).ImageGcLowThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfigInternal)KubeletConfig).ImageGcLowThreshold = value ?? default(int); } @@ -177,7 +238,7 @@ public partial class ManagedClusterAgentPoolProfileProperties : public int? KubeletConfigPodMaxPid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfigInternal)KubeletConfig).PodMaxPid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfigInternal)KubeletConfig).PodMaxPid = value ?? default(int); } /// - /// For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). + /// The Topology Manager policy to use. For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). /// The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] @@ -208,14 +269,16 @@ public partial class ManagedClusterAgentPoolProfileProperties : public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISysctlConfig LinuxOSConfigSysctl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ILinuxOSConfigInternal)LinuxOSConfig).Sysctl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ILinuxOSConfigInternal)LinuxOSConfig).Sysctl = value ?? null /* model class */; } /// - /// Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information - /// see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values are + /// 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent + /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string LinuxOSConfigTransparentHugePageDefrag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ILinuxOSConfigInternal)LinuxOSConfig).TransparentHugePageDefrag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ILinuxOSConfigInternal)LinuxOSConfig).TransparentHugePageDefrag = value ?? null; } /// - /// Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is 'always'. + /// For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string LinuxOSConfigTransparentHugePageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ILinuxOSConfigInternal)LinuxOSConfig).TransparentHugePageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ILinuxOSConfigInternal)LinuxOSConfig).TransparentHugePageEnabled = value ?? null; } @@ -234,30 +297,86 @@ public partial class ManagedClusterAgentPoolProfileProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public int? MaxPod { get => this._maxPod; set => this._maxPod = value; } + /// Backing field for property. + private string _messageOfTheDay; + + /// + /// Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. + /// This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must + /// be a static string (i.e., will be printed raw and not be executed as a script). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string MessageOfTheDay { get => this._messageOfTheDay; set => this._messageOfTheDay = value; } + /// Internal Acessors for CreationData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICreationData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.CreationData { get => (this._creationData = this._creationData ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CreationData()); set { {_creationData = value;} } } /// Internal Acessors for CurrentOrchestratorVersion string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.CurrentOrchestratorVersion { get => this._currentOrchestratorVersion; set { {_currentOrchestratorVersion = value;} } } + /// Internal Acessors for ETag + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ETag { get => this._eTag; set { {_eTag = value;} } } + + /// Internal Acessors for GatewayProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.GatewayProfile { get => (this._gatewayProfile = this._gatewayProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolGatewayProfile()); set { {_gatewayProfile = value;} } } + + /// Internal Acessors for GpuProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.GpuProfile { get => (this._gpuProfile = this._gpuProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.GpuProfile()); set { {_gpuProfile = value;} } } + /// Internal Acessors for KubeletConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubeletConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.KubeletConfig { get => (this._kubeletConfig = this._kubeletConfig ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubeletConfig()); set { {_kubeletConfig = value;} } } /// Internal Acessors for LinuxOSConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ILinuxOSConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.LinuxOSConfig { get => (this._linuxOSConfig = this._linuxOSConfig ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.LinuxOSConfig()); set { {_linuxOSConfig = value;} } } + /// Internal Acessors for NetworkProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.NetworkProfile { get => (this._networkProfile = this._networkProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolNetworkProfile()); set { {_networkProfile = value;} } } + /// Internal Acessors for NodeImageVersion string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.NodeImageVersion { get => this._nodeImageVersion; set { {_nodeImageVersion = value;} } } /// Internal Acessors for PowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.PowerState { get => (this._powerState = this._powerState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PowerState()); set { {_powerState = value;} } } + /// Internal Acessors for ProvisioningErrorAdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningErrorAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorAdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorAdditionalInfo = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningErrorCode + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorCode = value ?? null; } + + /// Internal Acessors for ProvisioningErrorDetail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorDetail = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningErrorMessage + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorMessage = value ?? null; } + + /// Internal Acessors for ProvisioningErrorTarget + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorTarget = value ?? null; } + /// Internal Acessors for ProvisioningState string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + /// Internal Acessors for SecurityProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.SecurityProfile { get => (this._securityProfile = this._securityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolSecurityProfile()); set { {_securityProfile = value;} } } + + /// Internal Acessors for Status + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.Status { get => (this._status = this._status ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolStatus()); set { {_status = value;} } } + + /// Internal Acessors for StatusProvisioningError + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.StatusProvisioningError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningError; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningError = value ?? null /* model class */; } + /// Internal Acessors for UpgradeSetting Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettings Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.UpgradeSetting { get => (this._upgradeSetting = this._upgradeSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolUpgradeSettings()); set { {_upgradeSetting = value;} } } + /// Internal Acessors for VirtualMachineProfileScale + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.VirtualMachineProfileScale { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfileInternal)VirtualMachinesProfile).Scale; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfileInternal)VirtualMachinesProfile).Scale = value ?? null /* model class */; } + + /// Internal Acessors for VirtualMachinesProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.VirtualMachinesProfile { get => (this._virtualMachinesProfile = this._virtualMachinesProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachinesProfile()); set { {_virtualMachinesProfile = value;} } } + + /// Internal Acessors for WindowsProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesInternal.WindowsProfile { get => (this._windowsProfile = this._windowsProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolWindowsProfile()); set { {_windowsProfile = value;} } } + /// Backing field for property. private int? _minCount; @@ -269,12 +388,35 @@ public partial class ManagedClusterAgentPoolProfileProperties : private string _mode; /// - /// A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions - /// and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools + /// The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information + /// on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Mode { get => this._mode; set => this._mode = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile _networkProfile; + + /// Network-related settings of an agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile NetworkProfile { get => (this._networkProfile = this._networkProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolNetworkProfile()); set => this._networkProfile = value; } + + /// + /// The port ranges that are allowed to access. The specified ranges are allowed to overlap. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List NetworkProfileAllowedHostPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)NetworkProfile).AllowedHostPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)NetworkProfile).AllowedHostPort = value ?? null /* arrayOf */; } + + /// + /// The IDs of the application security groups which agent pool will associate when created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List NetworkProfileApplicationSecurityGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)NetworkProfile).ApplicationSecurityGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)NetworkProfile).ApplicationSecurityGroup = value ?? null /* arrayOf */; } + + /// IPTags of instance-level public IPs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List NetworkProfileNodePublicIPTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)NetworkProfile).NodePublicIPTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfileInternal)NetworkProfile).NodePublicIPTag = value ?? null /* arrayOf */; } + /// Backing field for property. private string _nodeImageVersion; @@ -293,7 +435,7 @@ public partial class ManagedClusterAgentPoolProfileProperties : private string _nodePublicIPPrefixId; /// - /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// The public IP prefix ID which VM nodes should use IPs from. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string NodePublicIPPrefixId { get => this._nodePublicIPPrefixId; set => this._nodePublicIPPrefixId = value; } @@ -321,8 +463,9 @@ public partial class ManagedClusterAgentPoolProfileProperties : private string _oSDiskType; /// - /// The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, - /// defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + /// The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has a + /// cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. + /// For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string OSDiskType { get => this._oSDiskType; set => this._oSDiskType = value; } @@ -348,23 +491,33 @@ public partial class ManagedClusterAgentPoolProfileProperties : private string _orchestratorVersion; /// - /// Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When - /// is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same - /// once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. - /// As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool - /// version must have the same major version as the control plane. The node pool minor version must be within two minor versions - /// of the control plane version. The node pool version cannot be greater than the control plane version. For more information - /// see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + /// The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + /// (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. + /// Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, + /// even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to + /// the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool + /// minor version must be within two minor versions of the control plane version. The node pool version cannot be greater + /// than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string OrchestratorVersion { get => this._orchestratorVersion; set => this._orchestratorVersion = value; } + /// Backing field for property. + private string _podIPAllocationMode; + + /// + /// Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default + /// is 'DynamicIndividual'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string PodIPAllocationMode { get => this._podIPAllocationMode; set => this._podIPAllocationMode = value; } + /// Backing field for property. private string _podSubnetId; /// - /// If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node subnet + /// (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string PodSubnetId { get => this._podSubnetId; set => this._podSubnetId = value; } @@ -373,9 +526,9 @@ public partial class ManagedClusterAgentPoolProfileProperties : private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState _powerState; /// - /// When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. - /// A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it - /// is Running and provisioning state is Succeeded + /// Whether the Agent Pool is running or stopped. When an Agent Pool is first created it is initially Running. The Agent Pool + /// can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing + /// charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState PowerState { get => (this._powerState = this._powerState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PowerState()); set => this._powerState = value; } @@ -384,6 +537,26 @@ public partial class ManagedClusterAgentPoolProfileProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerStateInternal)PowerState).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerStateInternal)PowerState).Code = value ?? null; } + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorAdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorCode; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ProvisioningErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorDetail; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorMessage; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatusInternal)Status).ProvisioningErrorTarget; } + /// Backing field for property. private string _provisioningState; @@ -402,16 +575,22 @@ public partial class ManagedClusterAgentPoolProfileProperties : private string _scaleDownMode; /// - /// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. + /// The scale down mode to use when scaling the Agent Pool. This also effects the cluster autoscaler behavior. If not specified, + /// it defaults to Delete. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScaleDownMode { get => this._scaleDownMode; set => this._scaleDownMode = value; } + /// Specifications on how to scale the VirtualMachines agent pool to a fixed size. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ScaleManual { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfileInternal)VirtualMachinesProfile).ScaleManual; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfileInternal)VirtualMachinesProfile).ScaleManual = value ?? null /* arrayOf */; } + /// Backing field for property. private string _scaleSetEvictionPolicy; /// - /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// 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'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScaleSetEvictionPolicy { get => this._scaleSetEvictionPolicy; set => this._scaleSetEvictionPolicy = value; } @@ -425,16 +604,50 @@ public partial class ManagedClusterAgentPoolProfileProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScaleSetPriority { get => this._scaleSetPriority; set => this._scaleSetPriority = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile _securityProfile; + + /// The security settings of an agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile SecurityProfile { get => (this._securityProfile = this._securityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolSecurityProfile()); set => this._securityProfile = value; } + + /// + /// Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For + /// more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? SecurityProfileEnableSecureBoot { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)SecurityProfile).EnableSecureBoot; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)SecurityProfile).EnableSecureBoot = value ?? default(bool); } + + /// + /// vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the + /// node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? SecurityProfileEnableVtpm { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)SecurityProfile).EnableVtpm; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)SecurityProfile).EnableVtpm = value ?? default(bool); } + + /// SSH access method of an agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string SecurityProfileSshAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)SecurityProfile).SshAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfileInternal)SecurityProfile).SshAccess = value ?? null; } + /// Backing field for property. private float? _spotMaxPrice; /// - /// Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. - /// For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + /// The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value greater + /// than zero or -1 which indicates default price to be up-to on-demand. Possible values are any decimal value greater than + /// zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs + /// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public float? SpotMaxPrice { get => this._spotMaxPrice; set => this._spotMaxPrice = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus _status; + + /// Contains read-only information about the Agent Pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus Status { get => (this._status = this._status ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolStatus()); set => this._status = value; } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesTags _tag; @@ -457,33 +670,95 @@ public partial class ManagedClusterAgentPoolProfileProperties : internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettings UpgradeSetting { get => (this._upgradeSetting = this._upgradeSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolUpgradeSettings()); set => this._upgradeSetting = value; } /// - /// This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the - /// percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. - /// If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade + /// The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per + /// node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If + /// not specified, the default is 30 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? UpgradeSettingDrainTimeoutInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)UpgradeSetting).DrainTimeoutInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)UpgradeSetting).DrainTimeoutInMinute = value ?? default(int); } + + /// + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') + /// or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time + /// of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + /// including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string UpgradeSettingMaxSurge { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)UpgradeSetting).MaxSurge; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)UpgradeSetting).MaxSurge = value ?? null; } + /// + /// The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set + /// to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total + /// agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default + /// is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string UpgradeSettingMaxUnavailable { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)UpgradeSetting).MaxUnavailable; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)UpgradeSetting).MaxUnavailable = value ?? null; } + + /// + /// The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and + /// moving on to next node. If not specified, the default is 0 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? UpgradeSettingNodeSoakDurationInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)UpgradeSetting).NodeSoakDurationInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)UpgradeSetting).NodeSoakDurationInMinute = value ?? default(int); } + + /// + /// Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption + /// Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout + /// or pod is still being in a running state, can also cause undrainable nodes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string UpgradeSettingUndrainableNodeBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)UpgradeSetting).UndrainableNodeBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettingsInternal)UpgradeSetting).UndrainableNodeBehavior = value ?? null; } + /// Backing field for property. private string _vMSize; /// - /// VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might - /// fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions + /// 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 /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string VMSize { get => this._vMSize; set => this._vMSize = value; } + /// Backing field for property. + private System.Collections.Generic.List _virtualMachineNodesStatus; + + /// The status of nodes in a VirtualMachines agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List VirtualMachineNodesStatus { get => this._virtualMachineNodesStatus; set => this._virtualMachineNodesStatus = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile _virtualMachinesProfile; + + /// Specifications on VirtualMachines agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile VirtualMachinesProfile { get => (this._virtualMachinesProfile = this._virtualMachinesProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachinesProfile()); set => this._virtualMachinesProfile = value; } + /// Backing field for property. private string _vnetSubnetId; /// - /// If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to - /// nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// The ID of the subnet which agent pool nodes and optionally pods will join on startup. If this is not specified, a VNET + /// and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies + /// to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string VnetSubnetId { get => this._vnetSubnetId; set => this._vnetSubnetId = value; } + /// + /// Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if the + /// cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? WindowProfileDisableOutboundNat { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfileInternal)WindowsProfile).DisableOutboundNat; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfileInternal)WindowsProfile).DisableOutboundNat = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile _windowsProfile; + + /// The Windows agent pool's specific profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile WindowsProfile { get => (this._windowsProfile = this._windowsProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolWindowsProfile()); set => this._windowsProfile = value; } + /// Backing field for property. private string _workloadRuntime; @@ -517,6 +792,19 @@ public partial interface IManagedClusterAgentPoolProfileProperties : PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List AvailabilityZone { get; set; } /// + /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"AKS will associate the specified agent pool with the Capacity Reservation Group.", + SerializedName = @"capacityReservationGroupID", + PossibleTypes = new [] { typeof(string) })] + string CapacityReservationGroupId { get; set; } + /// /// 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. /// @@ -542,8 +830,9 @@ public partial interface IManagedClusterAgentPoolProfileProperties : PossibleTypes = new [] { typeof(string) })] string CreationDataSourceResourceId { get; set; } /// - /// If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion - /// is , this field will contain the full version being used. + /// The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version , + /// this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full + /// version being used. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -551,10 +840,25 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = false, Update = false, - Description = @"If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full version being used.", + Description = @"The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full version being used.", SerializedName = @"currentOrchestratorVersion", PossibleTypes = new [] { typeof(string) })] string CurrentOrchestratorVersion { get; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"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.", + SerializedName = @"eTag", + PossibleTypes = new [] { typeof(string) })] + string ETag { get; } /// Whether to enable auto-scaler [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -567,7 +871,8 @@ public partial interface IManagedClusterAgentPoolProfileProperties : PossibleTypes = new [] { typeof(bool) })] bool? EnableAutoScaling { get; set; } /// - /// This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption + /// Whether to enable host based OS and data drive encryption. This is only supported on certain VM sizes and in certain Azure + /// regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -575,12 +880,12 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption", + Description = @"Whether to enable host based OS and data drive encryption. This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption", SerializedName = @"enableEncryptionAtHost", PossibleTypes = new [] { typeof(bool) })] bool? EnableEncryptionAtHost { get; set; } /// - /// See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + /// Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) /// for more details. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -589,14 +894,14 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details.", + Description = @"Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details.", SerializedName = @"enableFIPS", PossibleTypes = new [] { typeof(bool) })] bool? EnableFips { get; set; } /// - /// Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario - /// is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. - /// For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + /// Whether each node is allocated its own public IP. Some scenarios may require nodes in a node pool to receive their own + /// dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection + /// to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). /// The default is false. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -605,7 +910,7 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false.", + Description = @"Whether each node is allocated its own public IP. Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false.", SerializedName = @"enableNodePublicIP", PossibleTypes = new [] { typeof(bool) })] bool? EnableNodePublicIP { get; set; } @@ -621,6 +926,23 @@ public partial interface IManagedClusterAgentPoolProfileProperties : PossibleTypes = new [] { typeof(bool) })] bool? EnableUltraSsd { get; set; } /// + /// The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size + /// of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. + /// The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, + /// the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default + /// value is 31. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default value is 31.", + SerializedName = @"publicIPPrefixSize", + PossibleTypes = new [] { typeof(int) })] + int? GatewayProfilePublicIPPrefixSize { get; set; } + /// /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -634,8 +956,21 @@ public partial interface IManagedClusterAgentPoolProfileProperties : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g")] string GpuInstanceProfile { get; set; } + /// Whether to install GPU drivers. When it's not specified, default is Install. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to install GPU drivers. When it's not specified, default is Install.", + SerializedName = @"driver", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Install", "None")] + string GpuProfileDriver { get; set; } /// - /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// The fully qualified resource ID of the Dedicated Host Group to provision virtual machines from, used only in creation + /// scenario and not allowed to changed once set. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. /// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -644,7 +979,7 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts).", + Description = @"The fully qualified resource ID of the Dedicated Host Group to provision virtual machines from, used only in creation scenario and not allowed to changed once set. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts).", SerializedName = @"hostGroupID", PossibleTypes = new [] { typeof(string) })] string HostGroupId { get; set; } @@ -683,20 +1018,22 @@ public partial interface IManagedClusterAgentPoolProfileProperties : SerializedName = @"containerLogMaxSizeMB", PossibleTypes = new [] { typeof(int) })] int? KubeletConfigContainerLogMaxSizeMb { get; set; } - /// The default is true. + /// + /// If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is true.", + Description = @"If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true.", SerializedName = @"cpuCfsQuota", PossibleTypes = new [] { typeof(bool) })] bool? KubeletConfigCpuCfsQuota { get; set; } /// - /// The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For - /// example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + /// The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an optional + /// fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -704,12 +1041,12 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'.", + Description = @"The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'.", SerializedName = @"cpuCfsQuotaPeriod", PossibleTypes = new [] { typeof(string) })] string KubeletConfigCpuCfsQuotaPeriod { get; set; } /// - /// The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + /// The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) /// for more information. Allowed values are 'none' and 'static'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -718,7 +1055,7 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) for more information. Allowed values are 'none' and 'static'.", + Description = @"The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) for more information. Allowed values are 'none' and 'static'.", SerializedName = @"cpuManagerPolicy", PossibleTypes = new [] { typeof(string) })] string KubeletConfigCpuManagerPolicy { get; set; } @@ -735,25 +1072,31 @@ public partial interface IManagedClusterAgentPoolProfileProperties : SerializedName = @"failSwapOn", PossibleTypes = new [] { typeof(bool) })] bool? KubeletConfigFailSwapOn { get; set; } - /// To disable image garbage collection, set to 100. The default is 85% + /// + /// The percent of disk usage after which image garbage collection is always run. To disable image garbage collection, set + /// to 100. The default is 85% + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"To disable image garbage collection, set to 100. The default is 85%", + Description = @"The percent of disk usage after which image garbage collection is always run. To disable image garbage collection, set to 100. The default is 85%", SerializedName = @"imageGcHighThreshold", PossibleTypes = new [] { typeof(int) })] int? KubeletConfigImageGcHighThreshold { get; set; } - /// This cannot be set higher than imageGcHighThreshold. The default is 80% + /// + /// The percent of disk usage before which image garbage collection is never run. This cannot be set higher than imageGcHighThreshold. + /// The default is 80% + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"This cannot be set higher than imageGcHighThreshold. The default is 80%", + Description = @"The percent of disk usage before which image garbage collection is never run. This cannot be set higher than imageGcHighThreshold. The default is 80%", SerializedName = @"imageGcLowThreshold", PossibleTypes = new [] { typeof(int) })] int? KubeletConfigImageGcLowThreshold { get; set; } @@ -769,7 +1112,7 @@ public partial interface IManagedClusterAgentPoolProfileProperties : PossibleTypes = new [] { typeof(int) })] int? KubeletConfigPodMaxPid { get; set; } /// - /// For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). + /// The Topology Manager policy to use. For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). /// The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -778,7 +1121,7 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'.", + Description = @"The Topology Manager policy to use. For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'.", SerializedName = @"topologyManagerPolicy", PossibleTypes = new [] { typeof(string) })] string KubeletConfigTopologyManagerPolicy { get; set; } @@ -819,8 +1162,9 @@ public partial interface IManagedClusterAgentPoolProfileProperties : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISysctlConfig) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISysctlConfig LinuxOSConfigSysctl { get; set; } /// - /// Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information - /// see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values are + /// 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent + /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -828,12 +1172,13 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).", + Description = @"Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).", SerializedName = @"transparentHugePageDefrag", PossibleTypes = new [] { typeof(string) })] string LinuxOSConfigTransparentHugePageDefrag { get; set; } /// - /// Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is 'always'. + /// For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -841,7 +1186,7 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).", + Description = @"Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).", SerializedName = @"transparentHugePageEnabled", PossibleTypes = new [] { typeof(string) })] string LinuxOSConfigTransparentHugePageEnabled { get; set; } @@ -867,6 +1212,21 @@ public partial interface IManagedClusterAgentPoolProfileProperties : SerializedName = @"maxPods", PossibleTypes = new [] { typeof(int) })] int? MaxPod { get; set; } + /// + /// Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. + /// This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must + /// be a static string (i.e., will be printed raw and not be executed as a script). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script).", + SerializedName = @"messageOfTheDay", + PossibleTypes = new [] { typeof(string) })] + string MessageOfTheDay { get; set; } /// The minimum number of nodes for auto-scaling [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -879,8 +1239,8 @@ public partial interface IManagedClusterAgentPoolProfileProperties : PossibleTypes = new [] { typeof(int) })] int? MinCount { get; set; } /// - /// A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions - /// and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools + /// The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information + /// on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -888,11 +1248,48 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools", + Description = @"The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools", SerializedName = @"mode", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("System", "User")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("System", "User", "Gateway")] string Mode { get; set; } + /// + /// The port ranges that are allowed to access. The specified ranges are allowed to overlap. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The port ranges that are allowed to access. The specified ranges are allowed to overlap.", + SerializedName = @"allowedHostPorts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRange) })] + System.Collections.Generic.List NetworkProfileAllowedHostPort { get; set; } + /// + /// The IDs of the application security groups which agent pool will associate when created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The IDs of the application security groups which agent pool will associate when created.", + SerializedName = @"applicationSecurityGroups", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List NetworkProfileApplicationSecurityGroup { get; set; } + /// IPTags of instance-level public IPs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"IPTags of instance-level public IPs.", + SerializedName = @"nodePublicIPTags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIPTag) })] + System.Collections.Generic.List NetworkProfileNodePublicIPTag { get; set; } /// The version of node image [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -916,7 +1313,7 @@ public partial interface IManagedClusterAgentPoolProfileProperties : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesNodeLabels) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get; set; } /// - /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// The public IP prefix ID which VM nodes should use IPs from. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -924,7 +1321,7 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}", + Description = @"The public IP prefix ID which VM nodes should use IPs from. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}", SerializedName = @"nodePublicIPPrefixID", PossibleTypes = new [] { typeof(string) })] string NodePublicIPPrefixId { get; set; } @@ -956,8 +1353,9 @@ public partial interface IManagedClusterAgentPoolProfileProperties : PossibleTypes = new [] { typeof(int) })] int? OSDiskSizeGb { get; set; } /// - /// The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, - /// defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + /// The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has a + /// cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. + /// For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -965,7 +1363,7 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os).", + Description = @"The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os).", SerializedName = @"osDiskType", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Managed", "Ephemeral")] @@ -983,7 +1381,7 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Description = @"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.", SerializedName = @"osSKU", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "CBLMariner", "Windows2019", "Windows2022")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "AzureLinux", "AzureLinux3", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204")] string OSSku { get; set; } /// The operating system type. The default is Linux. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -998,13 +1396,13 @@ public partial interface IManagedClusterAgentPoolProfileProperties : [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Linux", "Windows")] string OSType { get; set; } /// - /// Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When - /// is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same - /// once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. - /// As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool - /// version must have the same major version as the control plane. The node pool minor version must be within two minor versions - /// of the control plane version. The node pool version cannot be greater than the control plane version. For more information - /// see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + /// The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + /// (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. + /// Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, + /// even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to + /// the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool + /// minor version must be within two minor versions of the control plane version. The node pool version cannot be greater + /// than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1012,13 +1410,13 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool).", + Description = @"The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool).", SerializedName = @"orchestratorVersion", PossibleTypes = new [] { typeof(string) })] string OrchestratorVersion { get; set; } /// - /// If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default + /// is 'DynamicIndividual'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1026,7 +1424,22 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", + Description = @"Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'.", + SerializedName = @"podIPAllocationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("DynamicIndividual", "StaticBlock")] + string PodIPAllocationMode { get; set; } + /// + /// The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node subnet + /// (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", SerializedName = @"podSubnetID", PossibleTypes = new [] { typeof(string) })] string PodSubnetId { get; set; } @@ -1042,6 +1455,61 @@ public partial interface IManagedClusterAgentPoolProfileProperties : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Running", "Stopped")] string PowerStateCode { get; set; } + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorCode { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) })] + System.Collections.Generic.List ProvisioningErrorDetail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorMessage { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorTarget { get; } /// The current deployment or provisioning state. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1065,7 +1533,8 @@ public partial interface IManagedClusterAgentPoolProfileProperties : PossibleTypes = new [] { typeof(string) })] string ProximityPlacementGroupId { get; set; } /// - /// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. + /// The scale down mode to use when scaling the Agent Pool. This also effects the cluster autoscaler behavior. If not specified, + /// it defaults to Delete. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1073,13 +1542,25 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.", + Description = @"The scale down mode to use when scaling the Agent Pool. This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.", SerializedName = @"scaleDownMode", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Delete", "Deallocate")] string ScaleDownMode { get; set; } + /// Specifications on how to scale the VirtualMachines agent pool to a fixed size. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifications on how to scale the VirtualMachines agent pool to a fixed size.", + SerializedName = @"manual", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfile) })] + System.Collections.Generic.List ScaleManual { get; set; } /// - /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// 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'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1087,7 +1568,7 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.", + Description = @"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'.", SerializedName = @"scaleSetEvictionPolicy", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Delete", "Deallocate")] @@ -1107,8 +1588,50 @@ public partial interface IManagedClusterAgentPoolProfileProperties : [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Spot", "Regular")] string ScaleSetPriority { get; set; } /// - /// Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. - /// For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + /// Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For + /// more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false.", + SerializedName = @"enableSecureBoot", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityProfileEnableSecureBoot { get; set; } + /// + /// vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the + /// node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false.", + SerializedName = @"enableVTPM", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityProfileEnableVtpm { get; set; } + /// SSH access method of an agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"SSH access method of an agent pool.", + SerializedName = @"sshAccess", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("LocalUser", "Disabled")] + string SecurityProfileSshAccess { get; set; } + /// + /// The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value greater + /// than zero or -1 which indicates default price to be up-to on-demand. Possible values are any decimal value greater than + /// zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs + /// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1116,7 +1639,7 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing)", + Description = @"The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing)", SerializedName = @"spotMaxPrice", PossibleTypes = new [] { typeof(float) })] float? SpotMaxPrice { get; set; } @@ -1141,12 +1664,12 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Description = @"The type of Agent Pool.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("VirtualMachineScaleSets", "AvailabilitySet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("VirtualMachineScaleSets", "AvailabilitySet", "VirtualMachines")] string Type { get; set; } /// - /// This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the - /// percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. - /// If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade + /// The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per + /// node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If + /// not specified, the default is 30 minutes. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1154,13 +1677,31 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade", + Description = @"The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes.", + SerializedName = @"drainTimeoutInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? UpgradeSettingDrainTimeoutInMinute { get; set; } + /// + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') + /// or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time + /// of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + /// including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster", SerializedName = @"maxSurge", PossibleTypes = new [] { typeof(string) })] string UpgradeSettingMaxSurge { get; set; } /// - /// VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might - /// fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions + /// The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set + /// to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total + /// agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default + /// is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1168,13 +1709,69 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"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", + Description = @"The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster", + SerializedName = @"maxUnavailable", + PossibleTypes = new [] { typeof(string) })] + string UpgradeSettingMaxUnavailable { get; set; } + /// + /// The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and + /// moving on to next node. If not specified, the default is 0 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node. If not specified, the default is 0 minutes.", + SerializedName = @"nodeSoakDurationInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? UpgradeSettingNodeSoakDurationInMinute { get; set; } + /// + /// Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption + /// Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout + /// or pod is still being in a running state, can also cause undrainable nodes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout or pod is still being in a running state, can also cause undrainable nodes.", + SerializedName = @"undrainableNodeBehavior", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Cordon", "Schedule")] + string UpgradeSettingUndrainableNodeBehavior { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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", SerializedName = @"vmSize", PossibleTypes = new [] { typeof(string) })] string VMSize { get; set; } + /// The status of nodes in a VirtualMachines agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The status of nodes in a VirtualMachines agent pool.", + SerializedName = @"virtualMachineNodesStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodes) })] + System.Collections.Generic.List VirtualMachineNodesStatus { get; set; } /// - /// If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to - /// nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// The ID of the subnet which agent pool nodes and optionally pods will join on startup. If this is not specified, a VNET + /// and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies + /// to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1182,10 +1779,24 @@ public partial interface IManagedClusterAgentPoolProfileProperties : Read = true, Create = true, Update = true, - Description = @"If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", + Description = @"The ID of the subnet which agent pool nodes and optionally pods will join on startup. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", SerializedName = @"vnetSubnetID", PossibleTypes = new [] { typeof(string) })] string VnetSubnetId { get; set; } + /// + /// Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if the + /// cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled.", + SerializedName = @"disableOutboundNat", + PossibleTypes = new [] { typeof(bool) })] + bool? WindowProfileDisableOutboundNat { get; set; } /// Determines the type of workload a node can run. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1209,6 +1820,10 @@ internal partial interface IManagedClusterAgentPoolProfilePropertiesInternal /// System.Collections.Generic.List AvailabilityZone { get; set; } /// + /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// + string CapacityReservationGroupId { get; set; } + /// /// 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. /// @@ -1220,37 +1835,63 @@ internal partial interface IManagedClusterAgentPoolProfilePropertiesInternal /// This is the ARM ID of the source object to be used to create the target object. string CreationDataSourceResourceId { get; set; } /// - /// If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion - /// is , this field will contain the full version being used. + /// The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version , + /// this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full + /// version being used. /// string CurrentOrchestratorVersion { get; set; } + /// + /// 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. + /// + string ETag { get; set; } /// Whether to enable auto-scaler bool? EnableAutoScaling { get; set; } /// - /// This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption + /// Whether to enable host based OS and data drive encryption. This is only supported on certain VM sizes and in certain Azure + /// regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption /// bool? EnableEncryptionAtHost { get; set; } /// - /// See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + /// Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) /// for more details. /// bool? EnableFips { get; set; } /// - /// Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario - /// is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. - /// For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + /// Whether each node is allocated its own public IP. Some scenarios may require nodes in a node pool to receive their own + /// dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection + /// to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). /// The default is false. /// bool? EnableNodePublicIP { get; set; } /// Whether to enable UltraSSD bool? EnableUltraSsd { get; set; } /// + /// Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not Gateway. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolGatewayProfile GatewayProfile { get; set; } + /// + /// The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size + /// of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. + /// The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, + /// the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default + /// value is 31. + /// + int? GatewayProfilePublicIPPrefixSize { get; set; } + /// /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g")] string GpuInstanceProfile { get; set; } - /// - /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// GPU settings for the Agent Pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IGpuProfile GpuProfile { get; set; } + /// Whether to install GPU drivers. When it's not specified, default is Install. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Install", "None")] + string GpuProfileDriver { get; set; } + /// + /// The fully qualified resource ID of the Dedicated Host Group to provision virtual machines from, used only in creation + /// scenario and not allowed to changed once set. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. /// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). /// string HostGroupId { get; set; } @@ -1264,15 +1905,17 @@ internal partial interface IManagedClusterAgentPoolProfilePropertiesInternal int? KubeletConfigContainerLogMaxFile { get; set; } /// The maximum size (e.g. 10Mi) of container log file before it is rotated. int? KubeletConfigContainerLogMaxSizeMb { get; set; } - /// The default is true. + /// + /// If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true. + /// bool? KubeletConfigCpuCfsQuota { get; set; } /// - /// The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For - /// example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + /// The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an optional + /// fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. /// string KubeletConfigCpuCfsQuotaPeriod { get; set; } /// - /// The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + /// The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) /// for more information. Allowed values are 'none' and 'static'. /// string KubeletConfigCpuManagerPolicy { get; set; } @@ -1280,14 +1923,20 @@ internal partial interface IManagedClusterAgentPoolProfilePropertiesInternal /// If set to true it will make the Kubelet fail to start if swap is enabled on the node. /// bool? KubeletConfigFailSwapOn { get; set; } - /// To disable image garbage collection, set to 100. The default is 85% + /// + /// The percent of disk usage after which image garbage collection is always run. To disable image garbage collection, set + /// to 100. The default is 85% + /// int? KubeletConfigImageGcHighThreshold { get; set; } - /// This cannot be set higher than imageGcHighThreshold. The default is 80% + /// + /// The percent of disk usage before which image garbage collection is never run. This cannot be set higher than imageGcHighThreshold. + /// The default is 80% + /// int? KubeletConfigImageGcLowThreshold { get; set; } /// The maximum number of processes per pod. int? KubeletConfigPodMaxPid { get; set; } /// - /// For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). + /// The Topology Manager policy to use. For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). /// The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. /// string KubeletConfigTopologyManagerPolicy { get; set; } @@ -1303,32 +1952,52 @@ internal partial interface IManagedClusterAgentPoolProfilePropertiesInternal /// Sysctl settings for Linux agent nodes. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISysctlConfig LinuxOSConfigSysctl { get; set; } /// - /// Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information - /// see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values are + /// 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent + /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// string LinuxOSConfigTransparentHugePageDefrag { get; set; } /// - /// Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is 'always'. + /// For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). /// string LinuxOSConfigTransparentHugePageEnabled { get; set; } /// The maximum number of nodes for auto-scaling int? MaxCount { get; set; } /// The maximum number of pods that can run on a node. int? MaxPod { get; set; } + /// + /// Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. + /// This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must + /// be a static string (i.e., will be printed raw and not be executed as a script). + /// + string MessageOfTheDay { get; set; } /// The minimum number of nodes for auto-scaling int? MinCount { get; set; } /// - /// A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions - /// and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools + /// The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information + /// on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("System", "User")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("System", "User", "Gateway")] string Mode { get; set; } + /// Network-related settings of an agent pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolNetworkProfile NetworkProfile { get; set; } + /// + /// The port ranges that are allowed to access. The specified ranges are allowed to overlap. + /// + System.Collections.Generic.List NetworkProfileAllowedHostPort { get; set; } + /// + /// The IDs of the application security groups which agent pool will associate when created. + /// + System.Collections.Generic.List NetworkProfileApplicationSecurityGroup { get; set; } + /// IPTags of instance-level public IPs. + System.Collections.Generic.List NetworkProfileNodePublicIPTag { get; set; } /// The version of node image string NodeImageVersion { get; set; } /// The node labels to be persisted across all nodes in agent pool. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get; set; } /// - /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// The public IP prefix ID which VM nodes should use IPs from. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} /// string NodePublicIPPrefixId { get; set; } /// @@ -1341,8 +2010,9 @@ internal partial interface IManagedClusterAgentPoolProfilePropertiesInternal /// int? OSDiskSizeGb { get; set; } /// - /// The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, - /// defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + /// The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has a + /// cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. + /// For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Managed", "Ephemeral")] string OSDiskType { get; set; } @@ -1350,46 +2020,66 @@ internal partial interface IManagedClusterAgentPoolProfilePropertiesInternal /// 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. ///
- [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "CBLMariner", "Windows2019", "Windows2022")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "AzureLinux", "AzureLinux3", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204")] string OSSku { get; set; } /// The operating system type. The default is Linux. [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Linux", "Windows")] string OSType { get; set; } /// - /// Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When - /// is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same - /// once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. - /// As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool - /// version must have the same major version as the control plane. The node pool minor version must be within two minor versions - /// of the control plane version. The node pool version cannot be greater than the control plane version. For more information - /// see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + /// The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + /// (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. + /// Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, + /// even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to + /// the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool + /// minor version must be within two minor versions of the control plane version. The node pool version cannot be greater + /// than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). /// string OrchestratorVersion { get; set; } /// - /// If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default + /// is 'DynamicIndividual'. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("DynamicIndividual", "StaticBlock")] + string PodIPAllocationMode { get; set; } + /// + /// The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node subnet + /// (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} /// string PodSubnetId { get; set; } /// - /// When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. - /// A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it - /// is Running and provisioning state is Succeeded + /// Whether the Agent Pool is running or stopped. When an Agent Pool is first created it is initially Running. The Agent Pool + /// can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing + /// charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded /// Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState PowerState { get; set; } /// Tells whether the cluster is Running or Stopped [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Running", "Stopped")] string PowerStateCode { get; set; } + /// The error additional info. + System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get; set; } + /// The error code. + string ProvisioningErrorCode { get; set; } + /// The error details. + System.Collections.Generic.List ProvisioningErrorDetail { get; set; } + /// The error message. + string ProvisioningErrorMessage { get; set; } + /// The error target. + string ProvisioningErrorTarget { get; set; } /// The current deployment or provisioning state. string ProvisioningState { get; set; } /// The ID for Proximity Placement Group. string ProximityPlacementGroupId { get; set; } /// - /// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. + /// The scale down mode to use when scaling the Agent Pool. This also effects the cluster autoscaler behavior. If not specified, + /// it defaults to Delete. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Delete", "Deallocate")] string ScaleDownMode { get; set; } + /// Specifications on how to scale the VirtualMachines agent pool to a fixed size. + System.Collections.Generic.List ScaleManual { get; set; } /// - /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// 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'. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Delete", "Deallocate")] string ScaleSetEvictionPolicy { get; set; } @@ -1398,34 +2088,98 @@ internal partial interface IManagedClusterAgentPoolProfilePropertiesInternal ///
[global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Spot", "Regular")] string ScaleSetPriority { get; set; } + /// The security settings of an agent pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolSecurityProfile SecurityProfile { get; set; } /// - /// Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. - /// For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + /// Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For + /// more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + bool? SecurityProfileEnableSecureBoot { get; set; } + /// + /// vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the + /// node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + /// + bool? SecurityProfileEnableVtpm { get; set; } + /// SSH access method of an agent pool. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("LocalUser", "Disabled")] + string SecurityProfileSshAccess { get; set; } + /// + /// The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value greater + /// than zero or -1 which indicates default price to be up-to on-demand. Possible values are any decimal value greater than + /// zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs + /// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) /// float? SpotMaxPrice { get; set; } + /// Contains read-only information about the Agent Pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolStatus Status { get; set; } + /// + /// The error detail information of the agent pool. Preserves the detailed info of failure. If there was no error, this field + /// is omitted. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail StatusProvisioningError { get; set; } /// The tags to be persisted on the agent pool virtual machine scale set. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfilePropertiesTags Tag { get; set; } /// The type of Agent Pool. - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("VirtualMachineScaleSets", "AvailabilitySet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("VirtualMachineScaleSets", "AvailabilitySet", "VirtualMachines")] string Type { get; set; } /// Settings for upgrading the agentpool Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeSettings UpgradeSetting { get; set; } /// - /// This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the - /// percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. - /// If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade + /// The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per + /// node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If + /// not specified, the default is 30 minutes. + /// + int? UpgradeSettingDrainTimeoutInMinute { get; set; } + /// + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') + /// or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time + /// of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + /// including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster /// string UpgradeSettingMaxSurge { get; set; } /// - /// VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might - /// fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions + /// The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set + /// to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total + /// agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default + /// is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + /// + string UpgradeSettingMaxUnavailable { get; set; } + /// + /// The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and + /// moving on to next node. If not specified, the default is 0 minutes. + /// + int? UpgradeSettingNodeSoakDurationInMinute { get; set; } + /// + /// Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption + /// Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout + /// or pod is still being in a running state, can also cause undrainable nodes. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Cordon", "Schedule")] + string UpgradeSettingUndrainableNodeBehavior { get; set; } + /// + /// 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 /// string VMSize { get; set; } + /// The status of nodes in a VirtualMachines agent pool. + System.Collections.Generic.List VirtualMachineNodesStatus { get; set; } + /// Specifications on how to scale a VirtualMachines agent pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile VirtualMachineProfileScale { get; set; } + /// Specifications on VirtualMachines agent pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile VirtualMachinesProfile { get; set; } /// - /// If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to - /// nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// The ID of the subnet which agent pool nodes and optionally pods will join on startup. If this is not specified, a VNET + /// and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies + /// to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} /// string VnetSubnetId { get; set; } + /// + /// Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if the + /// cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. + /// + bool? WindowProfileDisableOutboundNat { get; set; } + /// The Windows agent pool's specific profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolWindowsProfile WindowsProfile { get; set; } /// Determines the type of workload a node can run. [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("OCIContainer", "WasmWasi")] string WorkloadRuntime { get; set; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfileProperties.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfileProperties.json.cs index 383380a06dfb..18020fad1076 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfileProperties.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAgentPoolProfileProperties.json.cs @@ -82,14 +82,24 @@ internal ManagedClusterAgentPoolProfileProperties(Microsoft.Azure.PowerShell.Cmd {_kubeletConfig = If( json?.PropertyT("kubeletConfig"), out var __jsonKubeletConfig) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.KubeletConfig.FromJson(__jsonKubeletConfig) : _kubeletConfig;} {_linuxOSConfig = If( json?.PropertyT("linuxOSConfig"), out var __jsonLinuxOSConfig) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.LinuxOSConfig.FromJson(__jsonLinuxOSConfig) : _linuxOSConfig;} {_creationData = If( json?.PropertyT("creationData"), out var __jsonCreationData) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CreationData.FromJson(__jsonCreationData) : _creationData;} + {_networkProfile = If( json?.PropertyT("networkProfile"), out var __jsonNetworkProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolNetworkProfile.FromJson(__jsonNetworkProfile) : _networkProfile;} + {_windowsProfile = If( json?.PropertyT("windowsProfile"), out var __jsonWindowsProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolWindowsProfile.FromJson(__jsonWindowsProfile) : _windowsProfile;} + {_securityProfile = If( json?.PropertyT("securityProfile"), out var __jsonSecurityProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolSecurityProfile.FromJson(__jsonSecurityProfile) : _securityProfile;} + {_gpuProfile = If( json?.PropertyT("gpuProfile"), out var __jsonGpuProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.GpuProfile.FromJson(__jsonGpuProfile) : _gpuProfile;} + {_gatewayProfile = If( json?.PropertyT("gatewayProfile"), out var __jsonGatewayProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolGatewayProfile.FromJson(__jsonGatewayProfile) : _gatewayProfile;} + {_virtualMachinesProfile = If( json?.PropertyT("virtualMachinesProfile"), out var __jsonVirtualMachinesProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachinesProfile.FromJson(__jsonVirtualMachinesProfile) : _virtualMachinesProfile;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolStatus.FromJson(__jsonStatus) : _status;} + {_eTag = If( json?.PropertyT("eTag"), out var __jsonETag) ? (string)__jsonETag : (string)_eTag;} {_count = If( json?.PropertyT("count"), out var __jsonCount) ? (int?)__jsonCount : _count;} {_vMSize = If( json?.PropertyT("vmSize"), out var __jsonVMSize) ? (string)__jsonVMSize : (string)_vMSize;} {_oSDiskSizeGb = If( json?.PropertyT("osDiskSizeGB"), out var __jsonOSDiskSizeGb) ? (int?)__jsonOSDiskSizeGb : _oSDiskSizeGb;} {_oSDiskType = If( json?.PropertyT("osDiskType"), out var __jsonOSDiskType) ? (string)__jsonOSDiskType : (string)_oSDiskType;} {_kubeletDiskType = If( json?.PropertyT("kubeletDiskType"), out var __jsonKubeletDiskType) ? (string)__jsonKubeletDiskType : (string)_kubeletDiskType;} {_workloadRuntime = If( json?.PropertyT("workloadRuntime"), out var __jsonWorkloadRuntime) ? (string)__jsonWorkloadRuntime : (string)_workloadRuntime;} + {_messageOfTheDay = If( json?.PropertyT("messageOfTheDay"), out var __jsonMessageOfTheDay) ? (string)__jsonMessageOfTheDay : (string)_messageOfTheDay;} {_vnetSubnetId = If( json?.PropertyT("vnetSubnetID"), out var __jsonVnetSubnetId) ? (string)__jsonVnetSubnetId : (string)_vnetSubnetId;} {_podSubnetId = If( json?.PropertyT("podSubnetID"), out var __jsonPodSubnetId) ? (string)__jsonPodSubnetId : (string)_podSubnetId;} + {_podIPAllocationMode = If( json?.PropertyT("podIPAllocationMode"), out var __jsonPodIPAllocationMode) ? (string)__jsonPodIPAllocationMode : (string)_podIPAllocationMode;} {_maxPod = If( json?.PropertyT("maxPods"), out var __jsonMaxPods) ? (int?)__jsonMaxPods : _maxPod;} {_oSType = If( json?.PropertyT("osType"), out var __jsonOSType) ? (string)__jsonOSType : (string)_oSType;} {_oSSku = If( json?.PropertyT("osSKU"), out var __jsonOSSku) ? (string)__jsonOSSku : (string)_oSSku;} @@ -117,7 +127,9 @@ internal ManagedClusterAgentPoolProfileProperties(Microsoft.Azure.PowerShell.Cmd {_enableUltraSsd = If( json?.PropertyT("enableUltraSSD"), out var __jsonEnableUltraSsd) ? (bool?)__jsonEnableUltraSsd : _enableUltraSsd;} {_enableFips = If( json?.PropertyT("enableFIPS"), out var __jsonEnableFips) ? (bool?)__jsonEnableFips : _enableFips;} {_gpuInstanceProfile = If( json?.PropertyT("gpuInstanceProfile"), out var __jsonGpuInstanceProfile) ? (string)__jsonGpuInstanceProfile : (string)_gpuInstanceProfile;} + {_capacityReservationGroupId = If( json?.PropertyT("capacityReservationGroupID"), out var __jsonCapacityReservationGroupId) ? (string)__jsonCapacityReservationGroupId : (string)_capacityReservationGroupId;} {_hostGroupId = If( json?.PropertyT("hostGroupID"), out var __jsonHostGroupId) ? (string)__jsonHostGroupId : (string)_hostGroupId;} + {_virtualMachineNodesStatus = If( json?.PropertyT("virtualMachineNodesStatus"), out var __jsonVirtualMachineNodesStatus) ? If( __jsonVirtualMachineNodesStatus as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodes) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.VirtualMachineNodes.FromJson(__k) )) ))() : null : _virtualMachineNodesStatus;} AfterFromJson(json); } @@ -147,14 +159,27 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro AddIf( null != this._kubeletConfig ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._kubeletConfig.ToJson(null,serializationMode) : null, "kubeletConfig" ,container.Add ); AddIf( null != this._linuxOSConfig ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._linuxOSConfig.ToJson(null,serializationMode) : null, "linuxOSConfig" ,container.Add ); AddIf( null != this._creationData ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._creationData.ToJson(null,serializationMode) : null, "creationData" ,container.Add ); + AddIf( null != this._networkProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._networkProfile.ToJson(null,serializationMode) : null, "networkProfile" ,container.Add ); + AddIf( null != this._windowsProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._windowsProfile.ToJson(null,serializationMode) : null, "windowsProfile" ,container.Add ); + AddIf( null != this._securityProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._securityProfile.ToJson(null,serializationMode) : null, "securityProfile" ,container.Add ); + AddIf( null != this._gpuProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._gpuProfile.ToJson(null,serializationMode) : null, "gpuProfile" ,container.Add ); + AddIf( null != this._gatewayProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._gatewayProfile.ToJson(null,serializationMode) : null, "gatewayProfile" ,container.Add ); + AddIf( null != this._virtualMachinesProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._virtualMachinesProfile.ToJson(null,serializationMode) : null, "virtualMachinesProfile" ,container.Add ); + AddIf( null != this._status ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._status.ToJson(null,serializationMode) : null, "status" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._eTag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._eTag.ToString()) : null, "eTag" ,container.Add ); + } AddIf( null != this._count ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._count) : null, "count" ,container.Add ); AddIf( null != (((object)this._vMSize)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._vMSize.ToString()) : null, "vmSize" ,container.Add ); AddIf( null != this._oSDiskSizeGb ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._oSDiskSizeGb) : null, "osDiskSizeGB" ,container.Add ); AddIf( null != (((object)this._oSDiskType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._oSDiskType.ToString()) : null, "osDiskType" ,container.Add ); AddIf( null != (((object)this._kubeletDiskType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._kubeletDiskType.ToString()) : null, "kubeletDiskType" ,container.Add ); AddIf( null != (((object)this._workloadRuntime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._workloadRuntime.ToString()) : null, "workloadRuntime" ,container.Add ); + AddIf( null != (((object)this._messageOfTheDay)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._messageOfTheDay.ToString()) : null, "messageOfTheDay" ,container.Add ); AddIf( null != (((object)this._vnetSubnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._vnetSubnetId.ToString()) : null, "vnetSubnetID" ,container.Add ); AddIf( null != (((object)this._podSubnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._podSubnetId.ToString()) : null, "podSubnetID" ,container.Add ); + AddIf( null != (((object)this._podIPAllocationMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._podIPAllocationMode.ToString()) : null, "podIPAllocationMode" ,container.Add ); AddIf( null != this._maxPod ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._maxPod) : null, "maxPods" ,container.Add ); AddIf( null != (((object)this._oSType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._oSType.ToString()) : null, "osType" ,container.Add ); AddIf( null != (((object)this._oSSku)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._oSSku.ToString()) : null, "osSKU" ,container.Add ); @@ -207,7 +232,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro AddIf( null != this._enableUltraSsd ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enableUltraSsd) : null, "enableUltraSSD" ,container.Add ); AddIf( null != this._enableFips ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enableFips) : null, "enableFIPS" ,container.Add ); AddIf( null != (((object)this._gpuInstanceProfile)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._gpuInstanceProfile.ToString()) : null, "gpuInstanceProfile" ,container.Add ); + AddIf( null != (((object)this._capacityReservationGroupId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._capacityReservationGroupId.ToString()) : null, "capacityReservationGroupID" ,container.Add ); AddIf( null != (((object)this._hostGroupId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._hostGroupId.ToString()) : null, "hostGroupID" ,container.Add ); + if (null != this._virtualMachineNodesStatus) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __n in this._virtualMachineNodesStatus ) + { + AddIf(__n?.ToJson(null, serializationMode) ,__m.Add); + } + container.Add("virtualMachineNodesStatus",__m); + } AfterToJson(ref container); return container; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAiToolchainOperatorProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAiToolchainOperatorProfile.PowerShell.cs new file mode 100644 index 000000000000..173b74258811 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAiToolchainOperatorProfile.PowerShell.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// When enabling the operator, a set of AKS managed CRDs and controllers will be installed in the cluster. The operator automates + /// the deployment of OSS models for inference and/or training purposes. It provides a set of preset models and enables distributed + /// inference against them. + /// + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAiToolchainOperatorProfileTypeConverter))] + public partial class ManagedClusterAiToolchainOperatorProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterAiToolchainOperatorProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterAiToolchainOperatorProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedClusterAiToolchainOperatorProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfileInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterAiToolchainOperatorProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfileInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// When enabling the operator, a set of AKS managed CRDs and controllers will be installed in the cluster. The operator automates + /// the deployment of OSS models for inference and/or training purposes. It provides a set of preset models and enables distributed + /// inference against them. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAiToolchainOperatorProfileTypeConverter))] + public partial interface IManagedClusterAiToolchainOperatorProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAiToolchainOperatorProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAiToolchainOperatorProfile.TypeConverter.cs new file mode 100644 index 000000000000..7cb39b8df21b --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAiToolchainOperatorProfile.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterAiToolchainOperatorProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterAiToolchainOperatorProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterAiToolchainOperatorProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterAiToolchainOperatorProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAiToolchainOperatorProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAiToolchainOperatorProfile.cs new file mode 100644 index 000000000000..fa3a15507dc7 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAiToolchainOperatorProfile.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// When enabling the operator, a set of AKS managed CRDs and controllers will be installed in the cluster. The operator automates + /// the deployment of OSS models for inference and/or training purposes. It provides a set of preset models and enables distributed + /// inference against them. + /// + public partial class ManagedClusterAiToolchainOperatorProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfileInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// + /// Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain operator enabled or not. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? Enabled { get => this._enabled; set => this._enabled = value; } + + /// + /// Creates an new instance. + /// + public ManagedClusterAiToolchainOperatorProfile() + { + + } + } + /// When enabling the operator, a set of AKS managed CRDs and controllers will be installed in the cluster. The operator automates + /// the deployment of OSS models for inference and/or training purposes. It provides a set of preset models and enables distributed + /// inference against them. + public partial interface IManagedClusterAiToolchainOperatorProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain operator enabled or not. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain operator enabled or not.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + + } + /// When enabling the operator, a set of AKS managed CRDs and controllers will be installed in the cluster. The operator automates + /// the deployment of OSS models for inference and/or training purposes. It provides a set of preset models and enables distributed + /// inference against them. + internal partial interface IManagedClusterAiToolchainOperatorProfileInternal + + { + /// + /// Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain operator enabled or not. + /// + bool? Enabled { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAiToolchainOperatorProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAiToolchainOperatorProfile.json.cs new file mode 100644 index 000000000000..4d2b0e3e2e10 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAiToolchainOperatorProfile.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// When enabling the operator, a set of AKS managed CRDs and controllers will be installed in the cluster. The operator automates + /// the deployment of OSS models for inference and/or training purposes. It provides a set of preset models and enables distributed + /// inference against them. + /// + public partial class ManagedClusterAiToolchainOperatorProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterAiToolchainOperatorProfile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedClusterAiToolchainOperatorProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : _enabled;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._enabled ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enabled) : null, "enabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterApiServerAccessProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterApiServerAccessProfile.PowerShell.cs index 137821b06a79..335f43c90232 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterApiServerAccessProfile.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterApiServerAccessProfile.PowerShell.cs @@ -131,6 +131,14 @@ internal ManagedClusterApiServerAccessProfile(global::System.Collections.IDictio { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)this).DisableRunCommand = (bool?) content.GetValueForProperty("DisableRunCommand",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)this).DisableRunCommand, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("EnableVnetIntegration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)this).EnableVnetIntegration = (bool?) content.GetValueForProperty("EnableVnetIntegration",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)this).EnableVnetIntegration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)this).SubnetId, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -168,6 +176,14 @@ internal ManagedClusterApiServerAccessProfile(global::System.Management.Automati { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)this).DisableRunCommand = (bool?) content.GetValueForProperty("DisableRunCommand",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)this).DisableRunCommand, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("EnableVnetIntegration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)this).EnableVnetIntegration = (bool?) content.GetValueForProperty("EnableVnetIntegration",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)this).EnableVnetIntegration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)this).SubnetId, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterApiServerAccessProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterApiServerAccessProfile.cs index 219e56c8d5ef..baca8f7752b8 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterApiServerAccessProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterApiServerAccessProfile.cs @@ -17,9 +17,9 @@ public partial class ManagedClusterApiServerAccessProfile : private System.Collections.Generic.List _authorizedIPRange; /// - /// IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use - /// Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized - /// IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + /// The IP ranges authorized to access the Kubernetes API server. IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + /// This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. + /// For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public System.Collections.Generic.List AuthorizedIPRange { get => this._authorizedIPRange; set => this._authorizedIPRange = value; } @@ -35,7 +35,7 @@ public partial class ManagedClusterApiServerAccessProfile : private bool? _enablePrivateCluster; /// - /// For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). + /// Whether to create the cluster as a private cluster or not. For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public bool? EnablePrivateCluster { get => this._enablePrivateCluster; set => this._enablePrivateCluster = value; } @@ -47,16 +47,35 @@ public partial class ManagedClusterApiServerAccessProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public bool? EnablePrivateClusterPublicFqdn { get => this._enablePrivateClusterPublicFqdn; set => this._enablePrivateClusterPublicFqdn = value; } + /// Backing field for property. + private bool? _enableVnetIntegration; + + /// + /// Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? EnableVnetIntegration { get => this._enableVnetIntegration; set => this._enableVnetIntegration = value; } + /// Backing field for property. private string _privateDnsZone; /// - /// The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). + /// The private DNS zone mode for the cluster. The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). /// Allowed values are 'system' and 'none'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string PrivateDnsZone { get => this._privateDnsZone; set => this._privateDnsZone = value; } + /// Backing field for property. + private string _subnetId; + + /// + /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with BYO + /// Vnet, or when updating an existing cluster to enable apiserver vnet integration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string SubnetId { get => this._subnetId; set => this._subnetId = value; } + /// Creates an new instance. public ManagedClusterApiServerAccessProfile() { @@ -68,9 +87,9 @@ public partial interface IManagedClusterApiServerAccessProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { /// - /// IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use - /// Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized - /// IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + /// The IP ranges authorized to access the Kubernetes API server. IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + /// This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. + /// For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -78,7 +97,7 @@ public partial interface IManagedClusterApiServerAccessProfile : Read = true, Create = true, Update = true, - Description = @"IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges).", + Description = @"The IP ranges authorized to access the Kubernetes API server. IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges).", SerializedName = @"authorizedIPRanges", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List AuthorizedIPRange { get; set; } @@ -94,7 +113,7 @@ public partial interface IManagedClusterApiServerAccessProfile : PossibleTypes = new [] { typeof(bool) })] bool? DisableRunCommand { get; set; } /// - /// For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). + /// Whether to create the cluster as a private cluster or not. For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -102,7 +121,7 @@ public partial interface IManagedClusterApiServerAccessProfile : Read = true, Create = true, Update = true, - Description = @"For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters).", + Description = @"Whether to create the cluster as a private cluster or not. For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters).", SerializedName = @"enablePrivateCluster", PossibleTypes = new [] { typeof(bool) })] bool? EnablePrivateCluster { get; set; } @@ -118,7 +137,20 @@ public partial interface IManagedClusterApiServerAccessProfile : PossibleTypes = new [] { typeof(bool) })] bool? EnablePrivateClusterPublicFqdn { get; set; } /// - /// The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). + /// Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more details.", + SerializedName = @"enableVnetIntegration", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableVnetIntegration { get; set; } + /// + /// The private DNS zone mode for the cluster. The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). /// Allowed values are 'system' and 'none'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -127,10 +159,24 @@ public partial interface IManagedClusterApiServerAccessProfile : Read = true, Create = true, Update = true, - Description = @"The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are 'system' and 'none'.", + Description = @"The private DNS zone mode for the cluster. The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are 'system' and 'none'.", SerializedName = @"privateDNSZone", PossibleTypes = new [] { typeof(string) })] string PrivateDnsZone { get; set; } + /// + /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with BYO + /// Vnet, or when updating an existing cluster to enable apiserver vnet integration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration.", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } } /// Access profile for managed cluster API server. @@ -138,24 +184,33 @@ internal partial interface IManagedClusterApiServerAccessProfileInternal { /// - /// IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use - /// Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized - /// IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + /// The IP ranges authorized to access the Kubernetes API server. IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + /// This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. + /// For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). /// System.Collections.Generic.List AuthorizedIPRange { get; set; } /// Whether to disable run command for the cluster or not. bool? DisableRunCommand { get; set; } /// - /// For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). + /// Whether to create the cluster as a private cluster or not. For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). /// bool? EnablePrivateCluster { get; set; } /// Whether to create additional public FQDN for private cluster or not. bool? EnablePrivateClusterPublicFqdn { get; set; } /// - /// The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). + /// Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more details. + /// + bool? EnableVnetIntegration { get; set; } + /// + /// The private DNS zone mode for the cluster. The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). /// Allowed values are 'system' and 'none'. /// string PrivateDnsZone { get; set; } + /// + /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with BYO + /// Vnet, or when updating an existing cluster to enable apiserver vnet integration. + /// + string SubnetId { get; set; } } } \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterApiServerAccessProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterApiServerAccessProfile.json.cs index 14bbcb3ca0c4..3bc6a016e392 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterApiServerAccessProfile.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterApiServerAccessProfile.json.cs @@ -82,6 +82,8 @@ internal ManagedClusterApiServerAccessProfile(Microsoft.Azure.PowerShell.Cmdlets {_privateDnsZone = If( json?.PropertyT("privateDNSZone"), out var __jsonPrivateDnsZone) ? (string)__jsonPrivateDnsZone : (string)_privateDnsZone;} {_enablePrivateClusterPublicFqdn = If( json?.PropertyT("enablePrivateClusterPublicFQDN"), out var __jsonEnablePrivateClusterPublicFqdn) ? (bool?)__jsonEnablePrivateClusterPublicFqdn : _enablePrivateClusterPublicFqdn;} {_disableRunCommand = If( json?.PropertyT("disableRunCommand"), out var __jsonDisableRunCommand) ? (bool?)__jsonDisableRunCommand : _disableRunCommand;} + {_enableVnetIntegration = If( json?.PropertyT("enableVnetIntegration"), out var __jsonEnableVnetIntegration) ? (bool?)__jsonEnableVnetIntegration : _enableVnetIntegration;} + {_subnetId = If( json?.PropertyT("subnetId"), out var __jsonSubnetId) ? (string)__jsonSubnetId : (string)_subnetId;} AfterFromJson(json); } @@ -118,6 +120,8 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro AddIf( null != (((object)this._privateDnsZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._privateDnsZone.ToString()) : null, "privateDNSZone" ,container.Add ); AddIf( null != this._enablePrivateClusterPublicFqdn ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enablePrivateClusterPublicFqdn) : null, "enablePrivateClusterPublicFQDN" ,container.Add ); AddIf( null != this._disableRunCommand ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._disableRunCommand) : null, "disableRunCommand" ,container.Add ); + AddIf( null != this._enableVnetIntegration ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enableVnetIntegration) : null, "enableVnetIntegration" ,container.Add ); + AddIf( null != (((object)this._subnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._subnetId.ToString()) : null, "subnetId" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAutoUpgradeProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAutoUpgradeProfile.PowerShell.cs index 44537112d062..0d0507dd9dd9 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAutoUpgradeProfile.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAutoUpgradeProfile.PowerShell.cs @@ -113,6 +113,10 @@ internal ManagedClusterAutoUpgradeProfile(global::System.Collections.IDictionary { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfileInternal)this).UpgradeChannel = (string) content.GetValueForProperty("UpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfileInternal)this).UpgradeChannel, global::System.Convert.ToString); } + if (content.Contains("NodeOSUpgradeChannel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfileInternal)this).NodeOSUpgradeChannel = (string) content.GetValueForProperty("NodeOSUpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfileInternal)this).NodeOSUpgradeChannel, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -134,6 +138,10 @@ internal ManagedClusterAutoUpgradeProfile(global::System.Management.Automation.P { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfileInternal)this).UpgradeChannel = (string) content.GetValueForProperty("UpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfileInternal)this).UpgradeChannel, global::System.Convert.ToString); } + if (content.Contains("NodeOSUpgradeChannel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfileInternal)this).NodeOSUpgradeChannel = (string) content.GetValueForProperty("NodeOSUpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfileInternal)this).NodeOSUpgradeChannel, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAutoUpgradeProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAutoUpgradeProfile.cs index 7b91b28f4468..680c1c4c5ca1 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAutoUpgradeProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAutoUpgradeProfile.cs @@ -13,11 +13,21 @@ public partial class ManagedClusterAutoUpgradeProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfileInternal { + /// Backing field for property. + private string _nodeOSUpgradeChannel; + + /// + /// Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string NodeOSUpgradeChannel { get => this._nodeOSUpgradeChannel; set => this._nodeOSUpgradeChannel = value; } + /// Backing field for property. private string _upgradeChannel; /// - /// For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + /// The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster auto-upgrade + /// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string UpgradeChannel { get => this._upgradeChannel; set => this._upgradeChannel = value; } @@ -33,7 +43,22 @@ public partial interface IManagedClusterAutoUpgradeProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { /// - /// For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + /// Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage.", + SerializedName = @"nodeOSUpgradeChannel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("None", "Unmanaged", "NodeImage", "SecurityPatch")] + string NodeOSUpgradeChannel { get; set; } + /// + /// The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster auto-upgrade + /// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -41,7 +66,7 @@ public partial interface IManagedClusterAutoUpgradeProfile : Read = true, Create = true, Update = true, - Description = @"For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel).", + Description = @"The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel).", SerializedName = @"upgradeChannel", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("rapid", "stable", "patch", "node-image", "none")] @@ -53,7 +78,13 @@ internal partial interface IManagedClusterAutoUpgradeProfileInternal { /// - /// For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + /// Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("None", "Unmanaged", "NodeImage", "SecurityPatch")] + string NodeOSUpgradeChannel { get; set; } + /// + /// The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster auto-upgrade + /// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("rapid", "stable", "patch", "node-image", "none")] string UpgradeChannel { get; set; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAutoUpgradeProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAutoUpgradeProfile.json.cs index d377142f58f7..c693e715dc58 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAutoUpgradeProfile.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAutoUpgradeProfile.json.cs @@ -78,6 +78,7 @@ internal ManagedClusterAutoUpgradeProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks return; } {_upgradeChannel = If( json?.PropertyT("upgradeChannel"), out var __jsonUpgradeChannel) ? (string)__jsonUpgradeChannel : (string)_upgradeChannel;} + {_nodeOSUpgradeChannel = If( json?.PropertyT("nodeOSUpgradeChannel"), out var __jsonNodeOSUpgradeChannel) ? (string)__jsonNodeOSUpgradeChannel : (string)_nodeOSUpgradeChannel;} AfterFromJson(json); } @@ -101,6 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro return container; } AddIf( null != (((object)this._upgradeChannel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._upgradeChannel.ToString()) : null, "upgradeChannel" ,container.Add ); + AddIf( null != (((object)this._nodeOSUpgradeChannel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._nodeOSUpgradeChannel.ToString()) : null, "nodeOSUpgradeChannel" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAzureMonitorProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAzureMonitorProfile.cs index abcdd5dafb11..37040292299a 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAzureMonitorProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterAzureMonitorProfile.cs @@ -49,7 +49,7 @@ public partial class ManagedClusterAzureMonitorProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileInternal.Metric { get => (this._metric = this._metric ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfileMetrics()); set { {_metric = value;} } } /// Internal Acessors for MetricKubeStateMetric - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileKubeStateMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileInternal.MetricKubeStateMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetricsInternal)Metric).KubeStateMetric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetricsInternal)Metric).KubeStateMetric = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileKubeStateMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileInternal.MetricKubeStateMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetricsInternal)Metric).KubeStateMetric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetricsInternal)Metric).KubeStateMetric = value ?? null /* model class */; } /// Creates an new instance. public ManagedClusterAzureMonitorProfile() diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterBootstrapProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterBootstrapProfile.PowerShell.cs new file mode 100644 index 000000000000..ee1fcde64164 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterBootstrapProfile.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The bootstrap profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterBootstrapProfileTypeConverter))] + public partial class ManagedClusterBootstrapProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterBootstrapProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterBootstrapProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedClusterBootstrapProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ArtifactSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfileInternal)this).ArtifactSource = (string) content.GetValueForProperty("ArtifactSource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfileInternal)this).ArtifactSource, global::System.Convert.ToString); + } + if (content.Contains("ContainerRegistryId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfileInternal)this).ContainerRegistryId = (string) content.GetValueForProperty("ContainerRegistryId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfileInternal)this).ContainerRegistryId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterBootstrapProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ArtifactSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfileInternal)this).ArtifactSource = (string) content.GetValueForProperty("ArtifactSource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfileInternal)this).ArtifactSource, global::System.Convert.ToString); + } + if (content.Contains("ContainerRegistryId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfileInternal)this).ContainerRegistryId = (string) content.GetValueForProperty("ContainerRegistryId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfileInternal)this).ContainerRegistryId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The bootstrap profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterBootstrapProfileTypeConverter))] + public partial interface IManagedClusterBootstrapProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterBootstrapProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterBootstrapProfile.TypeConverter.cs new file mode 100644 index 000000000000..71acd0d43b37 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterBootstrapProfile.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterBootstrapProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterBootstrapProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterBootstrapProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterBootstrapProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterBootstrapProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterBootstrapProfile.cs new file mode 100644 index 000000000000..7d6b2f6e0f88 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterBootstrapProfile.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The bootstrap profile. + public partial class ManagedClusterBootstrapProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfileInternal + { + + /// Backing field for property. + private string _artifactSource; + + /// The artifact source. The source where the artifacts are downloaded from. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ArtifactSource { get => this._artifactSource; set => this._artifactSource = value; } + + /// Backing field for property. + private string _containerRegistryId; + + /// + /// The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ContainerRegistryId { get => this._containerRegistryId; set => this._containerRegistryId = value; } + + /// Creates an new instance. + public ManagedClusterBootstrapProfile() + { + + } + } + /// The bootstrap profile. + public partial interface IManagedClusterBootstrapProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The artifact source. The source where the artifacts are downloaded from. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The artifact source. The source where the artifacts are downloaded from.", + SerializedName = @"artifactSource", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Cache", "Direct")] + string ArtifactSource { get; set; } + /// + /// The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy.", + SerializedName = @"containerRegistryId", + PossibleTypes = new [] { typeof(string) })] + string ContainerRegistryId { get; set; } + + } + /// The bootstrap profile. + internal partial interface IManagedClusterBootstrapProfileInternal + + { + /// The artifact source. The source where the artifacts are downloaded from. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Cache", "Direct")] + string ArtifactSource { get; set; } + /// + /// The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy. + /// + string ContainerRegistryId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterBootstrapProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterBootstrapProfile.json.cs new file mode 100644 index 000000000000..0f6c7b252c0f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterBootstrapProfile.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The bootstrap profile. + public partial class ManagedClusterBootstrapProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterBootstrapProfile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedClusterBootstrapProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_artifactSource = If( json?.PropertyT("artifactSource"), out var __jsonArtifactSource) ? (string)__jsonArtifactSource : (string)_artifactSource;} + {_containerRegistryId = If( json?.PropertyT("containerRegistryId"), out var __jsonContainerRegistryId) ? (string)__jsonContainerRegistryId : (string)_containerRegistryId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._artifactSource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._artifactSource.ToString()) : null, "artifactSource" ,container.Add ); + AddIf( null != (((object)this._containerRegistryId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._containerRegistryId.ToString()) : null, "containerRegistryId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterCostAnalysis.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterCostAnalysis.PowerShell.cs new file mode 100644 index 000000000000..223d04f559da --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterCostAnalysis.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The cost analysis configuration for the cluster + [System.ComponentModel.TypeConverter(typeof(ManagedClusterCostAnalysisTypeConverter))] + public partial class ManagedClusterCostAnalysis + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterCostAnalysis(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterCostAnalysis(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedClusterCostAnalysis(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysisInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysisInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterCostAnalysis(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysisInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysisInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The cost analysis configuration for the cluster + [System.ComponentModel.TypeConverter(typeof(ManagedClusterCostAnalysisTypeConverter))] + public partial interface IManagedClusterCostAnalysis + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterCostAnalysis.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterCostAnalysis.TypeConverter.cs new file mode 100644 index 000000000000..504fc9126fd0 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterCostAnalysis.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterCostAnalysisTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterCostAnalysis.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterCostAnalysis.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterCostAnalysis.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterCostAnalysis.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterCostAnalysis.cs new file mode 100644 index 000000000000..effa9e53261e --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterCostAnalysis.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The cost analysis configuration for the cluster + public partial class ManagedClusterCostAnalysis : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysisInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// + /// Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. + /// Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If + /// not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? Enabled { get => this._enabled; set => this._enabled = value; } + + /// Creates an new instance. + public ManagedClusterCostAnalysis() + { + + } + } + /// The cost analysis configuration for the cluster + public partial interface IManagedClusterCostAnalysis : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. + /// Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If + /// not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + + } + /// The cost analysis configuration for the cluster + internal partial interface IManagedClusterCostAnalysisInternal + + { + /// + /// Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. + /// Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If + /// not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. + /// + bool? Enabled { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterCostAnalysis.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterCostAnalysis.json.cs new file mode 100644 index 000000000000..d9a460a69d5c --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterCostAnalysis.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The cost analysis configuration for the cluster + public partial class ManagedClusterCostAnalysis + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterCostAnalysis(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedClusterCostAnalysis(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : _enabled;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._enabled ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enabled) : null, "enabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentity.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentity.PowerShell.cs index e86884bbc811..d5308ef5c6c8 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentity.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentity.PowerShell.cs @@ -121,6 +121,10 @@ internal ManagedClusterIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)this).Type, global::System.Convert.ToString); } + if (content.Contains("DelegatedResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)this).DelegatedResource = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources) content.GetValueForProperty("DelegatedResource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)this).DelegatedResource, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DelegatedResourcesTypeConverter.ConvertFrom); + } if (content.Contains("UserAssignedIdentity")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); @@ -154,6 +158,10 @@ internal ManagedClusterIdentity(global::System.Management.Automation.PSObject co { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)this).Type, global::System.Convert.ToString); } + if (content.Contains("DelegatedResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)this).DelegatedResource = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources) content.GetValueForProperty("DelegatedResource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)this).DelegatedResource, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DelegatedResourcesTypeConverter.ConvertFrom); + } if (content.Contains("UserAssignedIdentity")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentity.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentity.cs index 12912e069add..089acf41c4c7 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentity.cs @@ -13,6 +13,16 @@ public partial class ManagedClusterIdentity : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal { + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources _delegatedResource; + + /// + /// The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource Provider, + /// and managed cluster only accept one delegated identity resource. Internal use only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources DelegatedResource { get => (this._delegatedResource = this._delegatedResource ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DelegatedResources()); set => this._delegatedResource = value; } + /// Internal Acessors for PrincipalId string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } @@ -41,7 +51,7 @@ public partial class ManagedClusterIdentity : private string _type; /// - /// For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + /// The type of identity used for the managed cluster. For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Type { get => this._type; set => this._type = value; } @@ -50,7 +60,8 @@ public partial class ManagedClusterIdentity : private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityUserAssignedIdentities _userAssignedIdentity; /// - /// The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The user identity associated with the managed cluster. This identity will be used in control plane. Only one user assigned + /// identity is allowed. The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityUserAssignedIdentities UserAssignedIdentity { get => (this._userAssignedIdentity = this._userAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIdentityUserAssignedIdentities()); set => this._userAssignedIdentity = value; } @@ -65,6 +76,20 @@ public ManagedClusterIdentity() public partial interface IManagedClusterIdentity : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { + /// + /// The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource Provider, + /// and managed cluster only accept one delegated identity resource. Internal use only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource Provider, and managed cluster only accept one delegated identity resource. Internal use only.", + SerializedName = @"delegatedResources", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources DelegatedResource { get; set; } /// /// The principal id of the system assigned identity which is used by master components. /// @@ -92,7 +117,7 @@ public partial interface IManagedClusterIdentity : PossibleTypes = new [] { typeof(string) })] string TenantId { get; } /// - /// For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + /// The type of identity used for the managed cluster. For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -100,13 +125,14 @@ public partial interface IManagedClusterIdentity : Read = true, Create = true, Update = true, - Description = @"For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity).", + Description = @"The type of identity used for the managed cluster. For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity).", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "None")] string Type { get; set; } /// - /// The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The user identity associated with the managed cluster. This identity will be used in control plane. Only one user assigned + /// identity is allowed. The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -114,7 +140,7 @@ public partial interface IManagedClusterIdentity : Read = true, Create = true, Update = true, - Description = @"The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", + Description = @"The user identity associated with the managed cluster. This identity will be used in control plane. Only one user assigned identity is allowed. The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", SerializedName = @"userAssignedIdentities", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityUserAssignedIdentities) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } @@ -124,6 +150,11 @@ public partial interface IManagedClusterIdentity : internal partial interface IManagedClusterIdentityInternal { + /// + /// The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource Provider, + /// and managed cluster only accept one delegated identity resource. Internal use only. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDelegatedResources DelegatedResource { get; set; } /// /// The principal id of the system assigned identity which is used by master components. /// @@ -133,12 +164,13 @@ internal partial interface IManagedClusterIdentityInternal ///
string TenantId { get; set; } /// - /// For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + /// The type of identity used for the managed cluster. For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "None")] string Type { get; set; } /// - /// The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The user identity associated with the managed cluster. This identity will be used in control plane. Only one user assigned + /// identity is allowed. The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. /// Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentity.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentity.json.cs index 6cd94ff63184..5022208ace59 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentity.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentity.json.cs @@ -80,6 +80,7 @@ internal ManagedClusterIdentity(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.J {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)_principalId;} {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)_tenantId;} {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_delegatedResource = If( json?.PropertyT("delegatedResources"), out var __jsonDelegatedResources) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DelegatedResources.FromJson(__jsonDelegatedResources) : _delegatedResource;} {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentities"), out var __jsonUserAssignedIdentities) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIdentityUserAssignedIdentities.FromJson(__jsonUserAssignedIdentities) : _userAssignedIdentity;} AfterFromJson(json); } @@ -112,6 +113,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro AddIf( null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId" ,container.Add ); } AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AddIf( null != this._delegatedResource ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._delegatedResource.ToJson(null,serializationMode) : null, "delegatedResources" ,container.Add ); AddIf( null != this._userAssignedIdentity ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._userAssignedIdentity.ToJson(null,serializationMode) : null, "userAssignedIdentities" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentityUserAssignedIdentities.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentityUserAssignedIdentities.PowerShell.cs index 9bc27264a3ea..ba04304a21ee 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentityUserAssignedIdentities.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentityUserAssignedIdentities.PowerShell.cs @@ -8,7 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; /// - /// The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The user identity associated with the managed cluster. This identity will be used in control plane. Only one user assigned + /// identity is allowed. The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. /// [System.ComponentModel.TypeConverter(typeof(ManagedClusterIdentityUserAssignedIdentitiesTypeConverter))] public partial class ManagedClusterIdentityUserAssignedIdentities @@ -157,7 +158,8 @@ public override string ToString() return ToJsonString(); } } - /// The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The user identity associated with the managed cluster. This identity will be used in control plane. Only one user assigned + /// identity is allowed. The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. [System.ComponentModel.TypeConverter(typeof(ManagedClusterIdentityUserAssignedIdentitiesTypeConverter))] public partial interface IManagedClusterIdentityUserAssignedIdentities diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentityUserAssignedIdentities.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentityUserAssignedIdentities.cs index 635a3fafe64a..64d22cfcd84b 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentityUserAssignedIdentities.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentityUserAssignedIdentities.cs @@ -8,7 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The user identity associated with the managed cluster. This identity will be used in control plane. Only one user assigned + /// identity is allowed. The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. /// public partial class ManagedClusterIdentityUserAssignedIdentities : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIdentityUserAssignedIdentities, @@ -23,14 +24,16 @@ public ManagedClusterIdentityUserAssignedIdentities() } } - /// The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The user identity associated with the managed cluster. This identity will be used in control plane. Only one user assigned + /// identity is allowed. The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. public partial interface IManagedClusterIdentityUserAssignedIdentities : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray { } - /// The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The user identity associated with the managed cluster. This identity will be used in control plane. Only one user assigned + /// identity is allowed. The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. internal partial interface IManagedClusterIdentityUserAssignedIdentitiesInternal { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentityUserAssignedIdentities.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentityUserAssignedIdentities.json.cs index 3142053415be..d7c666939be1 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentityUserAssignedIdentities.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIdentityUserAssignedIdentities.json.cs @@ -8,7 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The user identity associated with the managed cluster. This identity will be used in control plane. Only one user assigned + /// identity is allowed. The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. /// public partial class ManagedClusterIdentityUserAssignedIdentities { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfile.PowerShell.cs new file mode 100644 index 000000000000..e66e0697943d --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfile.PowerShell.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Ingress profile for the container service cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterIngressProfileTypeConverter))] + public partial class ManagedClusterIngressProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterIngressProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterIngressProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedClusterIngressProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("WebAppRouting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRouting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting) content.GetValueForProperty("WebAppRouting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRouting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileWebAppRoutingTypeConverter.ConvertFrom); + } + if (content.Contains("WebAppRoutingNginx")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingNginx = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx) content.GetValueForProperty("WebAppRoutingNginx",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingNginx, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileNginxTypeConverter.ConvertFrom); + } + if (content.Contains("WebAppRoutingIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity) content.GetValueForProperty("WebAppRoutingIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UserAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("WebAppRoutingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingEnabled = (bool?) content.GetValueForProperty("WebAppRoutingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("WebAppRoutingDnsZoneResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingDnsZoneResourceId = (System.Collections.Generic.List) content.GetValueForProperty("WebAppRoutingDnsZoneResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingDnsZoneResourceId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("NginxDefaultIngressControllerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).NginxDefaultIngressControllerType = (string) content.GetValueForProperty("NginxDefaultIngressControllerType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).NginxDefaultIngressControllerType, global::System.Convert.ToString); + } + if (content.Contains("IdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).IdentityResourceId, global::System.Convert.ToString); + } + if (content.Contains("IdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).IdentityClientId = (string) content.GetValueForProperty("IdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).IdentityClientId, global::System.Convert.ToString); + } + if (content.Contains("IdentityObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).IdentityObjectId = (string) content.GetValueForProperty("IdentityObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).IdentityObjectId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterIngressProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("WebAppRouting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRouting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting) content.GetValueForProperty("WebAppRouting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRouting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileWebAppRoutingTypeConverter.ConvertFrom); + } + if (content.Contains("WebAppRoutingNginx")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingNginx = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx) content.GetValueForProperty("WebAppRoutingNginx",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingNginx, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileNginxTypeConverter.ConvertFrom); + } + if (content.Contains("WebAppRoutingIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity) content.GetValueForProperty("WebAppRoutingIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UserAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("WebAppRoutingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingEnabled = (bool?) content.GetValueForProperty("WebAppRoutingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("WebAppRoutingDnsZoneResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingDnsZoneResourceId = (System.Collections.Generic.List) content.GetValueForProperty("WebAppRoutingDnsZoneResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).WebAppRoutingDnsZoneResourceId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("NginxDefaultIngressControllerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).NginxDefaultIngressControllerType = (string) content.GetValueForProperty("NginxDefaultIngressControllerType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).NginxDefaultIngressControllerType, global::System.Convert.ToString); + } + if (content.Contains("IdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).IdentityResourceId, global::System.Convert.ToString); + } + if (content.Contains("IdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).IdentityClientId = (string) content.GetValueForProperty("IdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).IdentityClientId, global::System.Convert.ToString); + } + if (content.Contains("IdentityObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).IdentityObjectId = (string) content.GetValueForProperty("IdentityObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)this).IdentityObjectId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Ingress profile for the container service cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterIngressProfileTypeConverter))] + public partial interface IManagedClusterIngressProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfile.TypeConverter.cs new file mode 100644 index 000000000000..1db8785e06d6 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterIngressProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterIngressProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterIngressProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterIngressProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfile.cs new file mode 100644 index 000000000000..e8a7ffc991d5 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfile.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Ingress profile for the container service cluster. + public partial class ManagedClusterIngressProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal + { + + /// The client ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string IdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).IdentityClientId; } + + /// The object ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string IdentityObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).IdentityObjectId; } + + /// The resource ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string IdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).IdentityResourceId; } + + /// Internal Acessors for IdentityClientId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal.IdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).IdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).IdentityClientId = value ?? null; } + + /// Internal Acessors for IdentityObjectId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal.IdentityObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).IdentityObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).IdentityObjectId = value ?? null; } + + /// Internal Acessors for IdentityResourceId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal.IdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).IdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).IdentityResourceId = value ?? null; } + + /// Internal Acessors for WebAppRouting + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal.WebAppRouting { get => (this._webAppRouting = this._webAppRouting ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileWebAppRouting()); set { {_webAppRouting = value;} } } + + /// Internal Acessors for WebAppRoutingIdentity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal.WebAppRoutingIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).Identity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).Identity = value ?? null /* model class */; } + + /// Internal Acessors for WebAppRoutingNginx + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal.WebAppRoutingNginx { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).Nginx; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).Nginx = value ?? null /* model class */; } + + /// Ingress type for the default NginxIngressController custom resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string NginxDefaultIngressControllerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).NginxDefaultIngressControllerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).NginxDefaultIngressControllerType = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting _webAppRouting; + + /// + /// App Routing settings for the ingress profile. You can find an overview and onboarding guide for this feature at https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting WebAppRouting { get => (this._webAppRouting = this._webAppRouting ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileWebAppRouting()); set => this._webAppRouting = value; } + + /// + /// Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing + /// add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be + /// in the same resource group and all private DNS zones must be in the same resource group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List WebAppRoutingDnsZoneResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).DnsZoneResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).DnsZoneResourceId = value ?? null /* arrayOf */; } + + /// Whether to enable the Application Routing add-on. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? WebAppRoutingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)WebAppRouting).Enabled = value ?? default(bool); } + + /// Creates an new instance. + public ManagedClusterIngressProfile() + { + + } + } + /// Ingress profile for the container service cluster. + public partial interface IManagedClusterIngressProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The client ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The client ID of the user assigned identity.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string IdentityClientId { get; } + /// The object ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The object ID of the user assigned identity.", + SerializedName = @"objectId", + PossibleTypes = new [] { typeof(string) })] + string IdentityObjectId { get; } + /// The resource ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The resource ID of the user assigned identity.", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + string IdentityResourceId { get; } + /// Ingress type for the default NginxIngressController custom resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Ingress type for the default NginxIngressController custom resource", + SerializedName = @"defaultIngressControllerType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("AnnotationControlled", "External", "Internal", "None")] + string NginxDefaultIngressControllerType { get; set; } + /// + /// Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing + /// add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be + /// in the same resource group and all private DNS zones must be in the same resource group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in the same resource group.", + SerializedName = @"dnsZoneResourceIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List WebAppRoutingDnsZoneResourceId { get; set; } + /// Whether to enable the Application Routing add-on. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable the Application Routing add-on.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? WebAppRoutingEnabled { get; set; } + + } + /// Ingress profile for the container service cluster. + internal partial interface IManagedClusterIngressProfileInternal + + { + /// The client ID of the user assigned identity. + string IdentityClientId { get; set; } + /// The object ID of the user assigned identity. + string IdentityObjectId { get; set; } + /// The resource ID of the user assigned identity. + string IdentityResourceId { get; set; } + /// Ingress type for the default NginxIngressController custom resource + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("AnnotationControlled", "External", "Internal", "None")] + string NginxDefaultIngressControllerType { get; set; } + /// + /// App Routing settings for the ingress profile. You can find an overview and onboarding guide for this feature at https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting WebAppRouting { get; set; } + /// + /// Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing + /// add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be + /// in the same resource group and all private DNS zones must be in the same resource group. + /// + System.Collections.Generic.List WebAppRoutingDnsZoneResourceId { get; set; } + /// Whether to enable the Application Routing add-on. + bool? WebAppRoutingEnabled { get; set; } + /// + /// Managed identity of the Application Routing add-on. This is the identity that should be granted permissions, for example, + /// to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this overview of the add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) + /// for more instructions. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity WebAppRoutingIdentity { get; set; } + /// + /// Configuration for the default NginxIngressController. See more at https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx WebAppRoutingNginx { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfile.json.cs new file mode 100644 index 000000000000..f99da946271a --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfile.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Ingress profile for the container service cluster. + public partial class ManagedClusterIngressProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterIngressProfile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedClusterIngressProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_webAppRouting = If( json?.PropertyT("webAppRouting"), out var __jsonWebAppRouting) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileWebAppRouting.FromJson(__jsonWebAppRouting) : _webAppRouting;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._webAppRouting ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._webAppRouting.ToJson(null,serializationMode) : null, "webAppRouting" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileNginx.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileNginx.PowerShell.cs new file mode 100644 index 000000000000..b915db26254a --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileNginx.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ManagedClusterIngressProfileNginxTypeConverter))] + public partial class ManagedClusterIngressProfileNginx + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterIngressProfileNginx(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterIngressProfileNginx(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedClusterIngressProfileNginx(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DefaultIngressControllerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginxInternal)this).DefaultIngressControllerType = (string) content.GetValueForProperty("DefaultIngressControllerType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginxInternal)this).DefaultIngressControllerType, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterIngressProfileNginx(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DefaultIngressControllerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginxInternal)this).DefaultIngressControllerType = (string) content.GetValueForProperty("DefaultIngressControllerType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginxInternal)this).DefaultIngressControllerType, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(ManagedClusterIngressProfileNginxTypeConverter))] + public partial interface IManagedClusterIngressProfileNginx + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileNginx.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileNginx.TypeConverter.cs new file mode 100644 index 000000000000..6ec2433e2219 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileNginx.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterIngressProfileNginxTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterIngressProfileNginx.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterIngressProfileNginx.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterIngressProfileNginx.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileNginx.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileNginx.cs new file mode 100644 index 000000000000..1046908fc1b1 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileNginx.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + public partial class ManagedClusterIngressProfileNginx : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginxInternal + { + + /// Backing field for property. + private string _defaultIngressControllerType; + + /// Ingress type for the default NginxIngressController custom resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string DefaultIngressControllerType { get => this._defaultIngressControllerType; set => this._defaultIngressControllerType = value; } + + /// Creates an new instance. + public ManagedClusterIngressProfileNginx() + { + + } + } + public partial interface IManagedClusterIngressProfileNginx : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Ingress type for the default NginxIngressController custom resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Ingress type for the default NginxIngressController custom resource", + SerializedName = @"defaultIngressControllerType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("AnnotationControlled", "External", "Internal", "None")] + string DefaultIngressControllerType { get; set; } + + } + internal partial interface IManagedClusterIngressProfileNginxInternal + + { + /// Ingress type for the default NginxIngressController custom resource + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("AnnotationControlled", "External", "Internal", "None")] + string DefaultIngressControllerType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileNginx.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileNginx.json.cs new file mode 100644 index 000000000000..51548391d512 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileNginx.json.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + public partial class ManagedClusterIngressProfileNginx + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterIngressProfileNginx(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedClusterIngressProfileNginx(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_defaultIngressControllerType = If( json?.PropertyT("defaultIngressControllerType"), out var __jsonDefaultIngressControllerType) ? (string)__jsonDefaultIngressControllerType : (string)_defaultIngressControllerType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._defaultIngressControllerType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._defaultIngressControllerType.ToString()) : null, "defaultIngressControllerType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileWebAppRouting.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileWebAppRouting.PowerShell.cs new file mode 100644 index 000000000000..a7d43c5f9990 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileWebAppRouting.PowerShell.cs @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Application Routing add-on settings for the ingress profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterIngressProfileWebAppRoutingTypeConverter))] + public partial class ManagedClusterIngressProfileWebAppRouting + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterIngressProfileWebAppRouting(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterIngressProfileWebAppRouting(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedClusterIngressProfileWebAppRouting(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Nginx")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).Nginx = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx) content.GetValueForProperty("Nginx",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).Nginx, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileNginxTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UserAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DnsZoneResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).DnsZoneResourceId = (System.Collections.Generic.List) content.GetValueForProperty("DnsZoneResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).DnsZoneResourceId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("NginxDefaultIngressControllerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).NginxDefaultIngressControllerType = (string) content.GetValueForProperty("NginxDefaultIngressControllerType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).NginxDefaultIngressControllerType, global::System.Convert.ToString); + } + if (content.Contains("IdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).IdentityResourceId, global::System.Convert.ToString); + } + if (content.Contains("IdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).IdentityClientId = (string) content.GetValueForProperty("IdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).IdentityClientId, global::System.Convert.ToString); + } + if (content.Contains("IdentityObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).IdentityObjectId = (string) content.GetValueForProperty("IdentityObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).IdentityObjectId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterIngressProfileWebAppRouting(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Nginx")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).Nginx = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx) content.GetValueForProperty("Nginx",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).Nginx, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileNginxTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UserAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DnsZoneResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).DnsZoneResourceId = (System.Collections.Generic.List) content.GetValueForProperty("DnsZoneResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).DnsZoneResourceId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("NginxDefaultIngressControllerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).NginxDefaultIngressControllerType = (string) content.GetValueForProperty("NginxDefaultIngressControllerType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).NginxDefaultIngressControllerType, global::System.Convert.ToString); + } + if (content.Contains("IdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).IdentityResourceId, global::System.Convert.ToString); + } + if (content.Contains("IdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).IdentityClientId = (string) content.GetValueForProperty("IdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).IdentityClientId, global::System.Convert.ToString); + } + if (content.Contains("IdentityObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).IdentityObjectId = (string) content.GetValueForProperty("IdentityObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal)this).IdentityObjectId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Application Routing add-on settings for the ingress profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterIngressProfileWebAppRoutingTypeConverter))] + public partial interface IManagedClusterIngressProfileWebAppRouting + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileWebAppRouting.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileWebAppRouting.TypeConverter.cs new file mode 100644 index 000000000000..06a42673f8f3 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileWebAppRouting.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterIngressProfileWebAppRoutingTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterIngressProfileWebAppRouting.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterIngressProfileWebAppRouting.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterIngressProfileWebAppRouting.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileWebAppRouting.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileWebAppRouting.cs new file mode 100644 index 000000000000..ab12643ca071 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileWebAppRouting.cs @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Application Routing add-on settings for the ingress profile. + public partial class ManagedClusterIngressProfileWebAppRouting : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _dnsZoneResourceId; + + /// + /// Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing + /// add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be + /// in the same resource group and all private DNS zones must be in the same resource group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List DnsZoneResourceId { get => this._dnsZoneResourceId; set => this._dnsZoneResourceId = value; } + + /// Backing field for property. + private bool? _enabled; + + /// Whether to enable the Application Routing add-on. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? Enabled { get => this._enabled; set => this._enabled = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity _identity; + + /// + /// Managed identity of the Application Routing add-on. This is the identity that should be granted permissions, for example, + /// to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this overview of the add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) + /// for more instructions. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UserAssignedIdentity()); } + + /// The client ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string IdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ClientId; } + + /// The object ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string IdentityObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ObjectId; } + + /// The resource ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string IdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ResourceId; } + + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UserAssignedIdentity()); set { {_identity = value;} } } + + /// Internal Acessors for IdentityClientId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal.IdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ClientId = value ?? null; } + + /// Internal Acessors for IdentityObjectId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal.IdentityObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ObjectId = value ?? null; } + + /// Internal Acessors for IdentityResourceId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal.IdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentityInternal)Identity).ResourceId = value ?? null; } + + /// Internal Acessors for Nginx + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRoutingInternal.Nginx { get => (this._nginx = this._nginx ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileNginx()); set { {_nginx = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx _nginx; + + /// + /// Configuration for the default NginxIngressController. See more at https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx Nginx { get => (this._nginx = this._nginx ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileNginx()); set => this._nginx = value; } + + /// Ingress type for the default NginxIngressController custom resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string NginxDefaultIngressControllerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginxInternal)Nginx).DefaultIngressControllerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginxInternal)Nginx).DefaultIngressControllerType = value ?? null; } + + /// + /// Creates an new instance. + /// + public ManagedClusterIngressProfileWebAppRouting() + { + + } + } + /// Application Routing add-on settings for the ingress profile. + public partial interface IManagedClusterIngressProfileWebAppRouting : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing + /// add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be + /// in the same resource group and all private DNS zones must be in the same resource group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in the same resource group.", + SerializedName = @"dnsZoneResourceIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List DnsZoneResourceId { get; set; } + /// Whether to enable the Application Routing add-on. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable the Application Routing add-on.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + /// The client ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The client ID of the user assigned identity.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string IdentityClientId { get; } + /// The object ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The object ID of the user assigned identity.", + SerializedName = @"objectId", + PossibleTypes = new [] { typeof(string) })] + string IdentityObjectId { get; } + /// The resource ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The resource ID of the user assigned identity.", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + string IdentityResourceId { get; } + /// Ingress type for the default NginxIngressController custom resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Ingress type for the default NginxIngressController custom resource", + SerializedName = @"defaultIngressControllerType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("AnnotationControlled", "External", "Internal", "None")] + string NginxDefaultIngressControllerType { get; set; } + + } + /// Application Routing add-on settings for the ingress profile. + internal partial interface IManagedClusterIngressProfileWebAppRoutingInternal + + { + /// + /// Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing + /// add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be + /// in the same resource group and all private DNS zones must be in the same resource group. + /// + System.Collections.Generic.List DnsZoneResourceId { get; set; } + /// Whether to enable the Application Routing add-on. + bool? Enabled { get; set; } + /// + /// Managed identity of the Application Routing add-on. This is the identity that should be granted permissions, for example, + /// to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this overview of the add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) + /// for more instructions. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity Identity { get; set; } + /// The client ID of the user assigned identity. + string IdentityClientId { get; set; } + /// The object ID of the user assigned identity. + string IdentityObjectId { get; set; } + /// The resource ID of the user assigned identity. + string IdentityResourceId { get; set; } + /// + /// Configuration for the default NginxIngressController. See more at https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx Nginx { get; set; } + /// Ingress type for the default NginxIngressController custom resource + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("AnnotationControlled", "External", "Internal", "None")] + string NginxDefaultIngressControllerType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileWebAppRouting.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileWebAppRouting.json.cs new file mode 100644 index 000000000000..b27e22c15760 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterIngressProfileWebAppRouting.json.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Application Routing add-on settings for the ingress profile. + public partial class ManagedClusterIngressProfileWebAppRouting + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterIngressProfileWebAppRouting(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedClusterIngressProfileWebAppRouting(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_nginx = If( json?.PropertyT("nginx"), out var __jsonNginx) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileNginx.FromJson(__jsonNginx) : _nginx;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UserAssignedIdentity.FromJson(__jsonIdentity) : _identity;} + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : _enabled;} + {_dnsZoneResourceId = If( json?.PropertyT("dnsZoneResourceIds"), out var __jsonDnsZoneResourceIds) ? If( __jsonDnsZoneResourceIds as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _dnsZoneResourceId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._nginx ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._nginx.ToJson(null,serializationMode) : null, "nginx" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); + } + AddIf( null != this._enabled ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enabled) : null, "enabled" ,container.Add ); + if (null != this._dnsZoneResourceId) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._dnsZoneResourceId ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("dnsZoneResourceIds",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterLoadBalancerProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterLoadBalancerProfile.PowerShell.cs index 82695a27af19..5b70fb472146 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterLoadBalancerProfile.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterLoadBalancerProfile.PowerShell.cs @@ -139,6 +139,10 @@ internal ManagedClusterLoadBalancerProfile(global::System.Collections.IDictionar { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)this).EnableMultipleStandardLoadBalancer = (bool?) content.GetValueForProperty("EnableMultipleStandardLoadBalancer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)this).EnableMultipleStandardLoadBalancer, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("BackendPoolType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)this).BackendPoolType = (string) content.GetValueForProperty("BackendPoolType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)this).BackendPoolType, global::System.Convert.ToString); + } if (content.Contains("ManagedOutboundIPCount")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -200,6 +204,10 @@ internal ManagedClusterLoadBalancerProfile(global::System.Management.Automation. { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)this).EnableMultipleStandardLoadBalancer = (bool?) content.GetValueForProperty("EnableMultipleStandardLoadBalancer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)this).EnableMultipleStandardLoadBalancer, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("BackendPoolType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)this).BackendPoolType = (string) content.GetValueForProperty("BackendPoolType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)this).BackendPoolType, global::System.Convert.ToString); + } if (content.Contains("ManagedOutboundIPCount")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterLoadBalancerProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterLoadBalancerProfile.cs index 160df24a2b8e..3ecabcd55428 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterLoadBalancerProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterLoadBalancerProfile.cs @@ -23,12 +23,19 @@ public partial class ManagedClusterLoadBalancerProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public int? AllocatedOutboundPort { get => this._allocatedOutboundPort; set => this._allocatedOutboundPort = value; } + /// Backing field for property. + private string _backendPoolType; + + /// The type of the managed inbound Load Balancer BackendPool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string BackendPoolType { get => this._backendPoolType; set => this._backendPoolType = value; } + /// Backing field for property. private System.Collections.Generic.List _effectiveOutboundIP; /// The effective outbound IP resources of the cluster load balancer. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public System.Collections.Generic.List EffectiveOutboundIP { get => this._effectiveOutboundIP; set => this._effectiveOutboundIP = value; } + public System.Collections.Generic.List EffectiveOutboundIP { get => this._effectiveOutboundIP; } /// Backing field for property. private bool? _enableMultipleStandardLoadBalancer; @@ -68,6 +75,9 @@ public partial class ManagedClusterLoadBalancerProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public int? ManagedOutboundIPCountIpv6 { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)ManagedOutboundIP).CountIPv6; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)ManagedOutboundIP).CountIPv6 = value ?? default(int); } + /// Internal Acessors for EffectiveOutboundIP + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal.EffectiveOutboundIP { get => this._effectiveOutboundIP; set { {_effectiveOutboundIP = value;} } } + /// Internal Acessors for ManagedOutboundIP Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileManagedOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterLoadBalancerProfileInternal.ManagedOutboundIP { get => (this._managedOutboundIP = this._managedOutboundIP ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterLoadBalancerProfileManagedOutboundIPs()); set { {_managedOutboundIP = value;} } } @@ -123,17 +133,29 @@ public partial interface IManagedClusterLoadBalancerProfile : SerializedName = @"allocatedOutboundPorts", PossibleTypes = new [] { typeof(int) })] int? AllocatedOutboundPort { get; set; } - /// The effective outbound IP resources of the cluster load balancer. + /// The type of the managed inbound Load Balancer BackendPool. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, + Description = @"The type of the managed inbound Load Balancer BackendPool.", + SerializedName = @"backendPoolType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("NodeIPConfiguration", "NodeIP")] + string BackendPoolType { get; set; } + /// The effective outbound IP resources of the cluster load balancer. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The effective outbound IP resources of the cluster load balancer.", SerializedName = @"effectiveOutboundIPs", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceReference) })] - System.Collections.Generic.List EffectiveOutboundIP { get; set; } + System.Collections.Generic.List EffectiveOutboundIP { get; } /// Enable multiple standard load balancers per AKS cluster or not. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -220,6 +242,9 @@ internal partial interface IManagedClusterLoadBalancerProfileInternal /// value is 0 which results in Azure dynamically allocating ports. ///
int? AllocatedOutboundPort { get; set; } + /// The type of the managed inbound Load Balancer BackendPool. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("NodeIPConfiguration", "NodeIP")] + string BackendPoolType { get; set; } /// The effective outbound IP resources of the cluster load balancer. System.Collections.Generic.List EffectiveOutboundIP { get; set; } /// Enable multiple standard load balancers per AKS cluster or not. diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterLoadBalancerProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterLoadBalancerProfile.json.cs index 527c34efd4fe..04a44181f74a 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterLoadBalancerProfile.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterLoadBalancerProfile.json.cs @@ -84,6 +84,7 @@ internal ManagedClusterLoadBalancerProfile(Microsoft.Azure.PowerShell.Cmdlets.Ak {_allocatedOutboundPort = If( json?.PropertyT("allocatedOutboundPorts"), out var __jsonAllocatedOutboundPorts) ? (int?)__jsonAllocatedOutboundPorts : _allocatedOutboundPort;} {_idleTimeoutInMinute = If( json?.PropertyT("idleTimeoutInMinutes"), out var __jsonIdleTimeoutInMinutes) ? (int?)__jsonIdleTimeoutInMinutes : _idleTimeoutInMinute;} {_enableMultipleStandardLoadBalancer = If( json?.PropertyT("enableMultipleStandardLoadBalancers"), out var __jsonEnableMultipleStandardLoadBalancers) ? (bool?)__jsonEnableMultipleStandardLoadBalancers : _enableMultipleStandardLoadBalancer;} + {_backendPoolType = If( json?.PropertyT("backendPoolType"), out var __jsonBackendPoolType) ? (string)__jsonBackendPoolType : (string)_backendPoolType;} AfterFromJson(json); } @@ -109,18 +110,22 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro AddIf( null != this._managedOutboundIP ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._managedOutboundIP.ToJson(null,serializationMode) : null, "managedOutboundIPs" ,container.Add ); AddIf( null != this._outboundIPPrefix ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._outboundIPPrefix.ToJson(null,serializationMode) : null, "outboundIPPrefixes" ,container.Add ); AddIf( null != this._outboundIP ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._outboundIP.ToJson(null,serializationMode) : null, "outboundIPs" ,container.Add ); - if (null != this._effectiveOutboundIP) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); - foreach( var __x in this._effectiveOutboundIP ) + if (null != this._effectiveOutboundIP) { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._effectiveOutboundIP ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("effectiveOutboundIPs",__w); } - container.Add("effectiveOutboundIPs",__w); } AddIf( null != this._allocatedOutboundPort ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._allocatedOutboundPort) : null, "allocatedOutboundPorts" ,container.Add ); AddIf( null != this._idleTimeoutInMinute ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._idleTimeoutInMinute) : null, "idleTimeoutInMinutes" ,container.Add ); AddIf( null != this._enableMultipleStandardLoadBalancer ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enableMultipleStandardLoadBalancer) : null, "enableMultipleStandardLoadBalancers" ,container.Add ); + AddIf( null != (((object)this._backendPoolType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._backendPoolType.ToString()) : null, "backendPoolType" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterMetricsProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterMetricsProfile.PowerShell.cs new file mode 100644 index 000000000000..5c9d756302a4 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterMetricsProfile.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The metrics profile for the ManagedCluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterMetricsProfileTypeConverter))] + public partial class ManagedClusterMetricsProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterMetricsProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterMetricsProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedClusterMetricsProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CostAnalysis")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfileInternal)this).CostAnalysis = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis) content.GetValueForProperty("CostAnalysis",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfileInternal)this).CostAnalysis, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterCostAnalysisTypeConverter.ConvertFrom); + } + if (content.Contains("CostAnalysisEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfileInternal)this).CostAnalysisEnabled = (bool?) content.GetValueForProperty("CostAnalysisEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfileInternal)this).CostAnalysisEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterMetricsProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CostAnalysis")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfileInternal)this).CostAnalysis = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis) content.GetValueForProperty("CostAnalysis",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfileInternal)this).CostAnalysis, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterCostAnalysisTypeConverter.ConvertFrom); + } + if (content.Contains("CostAnalysisEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfileInternal)this).CostAnalysisEnabled = (bool?) content.GetValueForProperty("CostAnalysisEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfileInternal)this).CostAnalysisEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The metrics profile for the ManagedCluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterMetricsProfileTypeConverter))] + public partial interface IManagedClusterMetricsProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterMetricsProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterMetricsProfile.TypeConverter.cs new file mode 100644 index 000000000000..2a895bdceaae --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterMetricsProfile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterMetricsProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterMetricsProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterMetricsProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterMetricsProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterMetricsProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterMetricsProfile.cs new file mode 100644 index 000000000000..8d8315f96900 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterMetricsProfile.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The metrics profile for the ManagedCluster. + public partial class ManagedClusterMetricsProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfileInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis _costAnalysis; + + /// The configuration for detailed per-Kubernetes resource cost analysis. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis CostAnalysis { get => (this._costAnalysis = this._costAnalysis ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterCostAnalysis()); set => this._costAnalysis = value; } + + /// + /// Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. + /// Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If + /// not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? CostAnalysisEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysisInternal)CostAnalysis).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysisInternal)CostAnalysis).Enabled = value ?? default(bool); } + + /// Internal Acessors for CostAnalysis + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfileInternal.CostAnalysis { get => (this._costAnalysis = this._costAnalysis ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterCostAnalysis()); set { {_costAnalysis = value;} } } + + /// Creates an new instance. + public ManagedClusterMetricsProfile() + { + + } + } + /// The metrics profile for the ManagedCluster. + public partial interface IManagedClusterMetricsProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. + /// Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If + /// not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? CostAnalysisEnabled { get; set; } + + } + /// The metrics profile for the ManagedCluster. + internal partial interface IManagedClusterMetricsProfileInternal + + { + /// The configuration for detailed per-Kubernetes resource cost analysis. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis CostAnalysis { get; set; } + /// + /// Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. + /// Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If + /// not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. + /// + bool? CostAnalysisEnabled { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterMetricsProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterMetricsProfile.json.cs new file mode 100644 index 000000000000..429f93ed4be8 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterMetricsProfile.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The metrics profile for the ManagedCluster. + public partial class ManagedClusterMetricsProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterMetricsProfile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedClusterMetricsProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_costAnalysis = If( json?.PropertyT("costAnalysis"), out var __jsonCostAnalysis) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterCostAnalysis.FromJson(__jsonCostAnalysis) : _costAnalysis;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._costAnalysis ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._costAnalysis.ToJson(null,serializationMode) : null, "costAnalysis" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNatGatewayProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNatGatewayProfile.cs index 2ca520d65f06..abe9e5cb4e67 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNatGatewayProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNatGatewayProfile.cs @@ -18,7 +18,7 @@ public partial class ManagedClusterNatGatewayProfile : /// The effective outbound IP resources of the cluster NAT gateway. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public System.Collections.Generic.List EffectiveOutboundIP { get => this._effectiveOutboundIP; set => this._effectiveOutboundIP = value; } + public System.Collections.Generic.List EffectiveOutboundIP { get => this._effectiveOutboundIP; } /// Backing field for property. private int? _idleTimeoutInMinute; @@ -44,6 +44,9 @@ public partial class ManagedClusterNatGatewayProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public int? ManagedOutboundIPProfileCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterManagedOutboundIPProfileInternal)ManagedOutboundIPProfile).Count; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterManagedOutboundIPProfileInternal)ManagedOutboundIPProfile).Count = value ?? default(int); } + /// Internal Acessors for EffectiveOutboundIP + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfileInternal.EffectiveOutboundIP { get => this._effectiveOutboundIP; set { {_effectiveOutboundIP = value;} } } + /// Internal Acessors for ManagedOutboundIPProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterManagedOutboundIPProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNatGatewayProfileInternal.ManagedOutboundIPProfile { get => (this._managedOutboundIPProfile = this._managedOutboundIPProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterManagedOutboundIPProfile()); set { {_managedOutboundIPProfile = value;} } } @@ -60,14 +63,14 @@ public partial interface IManagedClusterNatGatewayProfile : /// The effective outbound IP resources of the cluster NAT gateway. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Read = true, - Create = true, - Update = true, + Create = false, + Update = false, Description = @"The effective outbound IP resources of the cluster NAT gateway.", SerializedName = @"effectiveOutboundIPs", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceReference) })] - System.Collections.Generic.List EffectiveOutboundIP { get; set; } + System.Collections.Generic.List EffectiveOutboundIP { get; } /// /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value /// is 4 minutes. diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNatGatewayProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNatGatewayProfile.json.cs index 01a75222afb5..e462017eac9b 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNatGatewayProfile.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNatGatewayProfile.json.cs @@ -103,14 +103,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro return container; } AddIf( null != this._managedOutboundIPProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._managedOutboundIPProfile.ToJson(null,serializationMode) : null, "managedOutboundIPProfile" ,container.Add ); - if (null != this._effectiveOutboundIP) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); - foreach( var __x in this._effectiveOutboundIP ) + if (null != this._effectiveOutboundIP) { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._effectiveOutboundIP ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("effectiveOutboundIPs",__w); } - container.Add("effectiveOutboundIPs",__w); } AddIf( null != this._idleTimeoutInMinute ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._idleTimeoutInMinute) : null, "idleTimeoutInMinutes" ,container.Add ); AfterToJson(ref container); diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeProvisioningProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeProvisioningProfile.PowerShell.cs new file mode 100644 index 000000000000..660966c1e698 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeProvisioningProfile.PowerShell.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ManagedClusterNodeProvisioningProfileTypeConverter))] + public partial class ManagedClusterNodeProvisioningProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterNodeProvisioningProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterNodeProvisioningProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedClusterNodeProvisioningProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Mode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfileInternal)this).Mode = (string) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfileInternal)this).Mode, global::System.Convert.ToString); + } + if (content.Contains("DefaultNodePool")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfileInternal)this).DefaultNodePool = (string) content.GetValueForProperty("DefaultNodePool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfileInternal)this).DefaultNodePool, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterNodeProvisioningProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Mode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfileInternal)this).Mode = (string) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfileInternal)this).Mode, global::System.Convert.ToString); + } + if (content.Contains("DefaultNodePool")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfileInternal)this).DefaultNodePool = (string) content.GetValueForProperty("DefaultNodePool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfileInternal)this).DefaultNodePool, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(ManagedClusterNodeProvisioningProfileTypeConverter))] + public partial interface IManagedClusterNodeProvisioningProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeProvisioningProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeProvisioningProfile.TypeConverter.cs new file mode 100644 index 000000000000..003bf9cb2de8 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeProvisioningProfile.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterNodeProvisioningProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterNodeProvisioningProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterNodeProvisioningProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterNodeProvisioningProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeProvisioningProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeProvisioningProfile.cs new file mode 100644 index 000000000000..c447fe5c02e5 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeProvisioningProfile.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + public partial class ManagedClusterNodeProvisioningProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfileInternal + { + + /// Backing field for property. + private string _defaultNodePool; + + /// + /// The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless mode is + /// 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to + /// be deleted, which will drain and delete the nodes associated with those pools. It is strongly recommended to not do this + /// unless there are idle nodes ready to take the pods evicted by that action. If not specified, the default is Auto. For + /// more information see aka.ms/aks/nap#node-pools. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string DefaultNodePool { get => this._defaultNodePool; set => this._defaultNodePool = value; } + + /// Backing field for property. + private string _mode; + + /// The node provisioning mode. If not specified, the default is Manual. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Mode { get => this._mode; set => this._mode = value; } + + /// Creates an new instance. + public ManagedClusterNodeProvisioningProfile() + { + + } + } + public partial interface IManagedClusterNodeProvisioningProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless mode is + /// 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to + /// be deleted, which will drain and delete the nodes associated with those pools. It is strongly recommended to not do this + /// unless there are idle nodes ready to take the pods evicted by that action. If not specified, the default is Auto. For + /// more information see aka.ms/aks/nap#node-pools. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless mode is 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to be deleted, which will drain and delete the nodes associated with those pools. It is strongly recommended to not do this unless there are idle nodes ready to take the pods evicted by that action. If not specified, the default is Auto. For more information see aka.ms/aks/nap#node-pools.", + SerializedName = @"defaultNodePools", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("None", "Auto")] + string DefaultNodePool { get; set; } + /// The node provisioning mode. If not specified, the default is Manual. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The node provisioning mode. If not specified, the default is Manual.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Manual", "Auto")] + string Mode { get; set; } + + } + internal partial interface IManagedClusterNodeProvisioningProfileInternal + + { + /// + /// The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless mode is + /// 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to + /// be deleted, which will drain and delete the nodes associated with those pools. It is strongly recommended to not do this + /// unless there are idle nodes ready to take the pods evicted by that action. If not specified, the default is Auto. For + /// more information see aka.ms/aks/nap#node-pools. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("None", "Auto")] + string DefaultNodePool { get; set; } + /// The node provisioning mode. If not specified, the default is Manual. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Manual", "Auto")] + string Mode { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeProvisioningProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeProvisioningProfile.json.cs new file mode 100644 index 000000000000..5858cd3b8eb2 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeProvisioningProfile.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + public partial class ManagedClusterNodeProvisioningProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterNodeProvisioningProfile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedClusterNodeProvisioningProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_mode = If( json?.PropertyT("mode"), out var __jsonMode) ? (string)__jsonMode : (string)_mode;} + {_defaultNodePool = If( json?.PropertyT("defaultNodePools"), out var __jsonDefaultNodePools) ? (string)__jsonDefaultNodePools : (string)_defaultNodePool;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._mode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._mode.ToString()) : null, "mode" ,container.Add ); + AddIf( null != (((object)this._defaultNodePool)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._defaultNodePool.ToString()) : null, "defaultNodePools" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeResourceGroupProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeResourceGroupProfile.PowerShell.cs new file mode 100644 index 000000000000..79f95388ebe8 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeResourceGroupProfile.PowerShell.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Node resource group lockdown profile for a managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterNodeResourceGroupProfileTypeConverter))] + public partial class ManagedClusterNodeResourceGroupProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterNodeResourceGroupProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterNodeResourceGroupProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedClusterNodeResourceGroupProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RestrictionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfileInternal)this).RestrictionLevel = (string) content.GetValueForProperty("RestrictionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfileInternal)this).RestrictionLevel, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterNodeResourceGroupProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RestrictionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfileInternal)this).RestrictionLevel = (string) content.GetValueForProperty("RestrictionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfileInternal)this).RestrictionLevel, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Node resource group lockdown profile for a managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterNodeResourceGroupProfileTypeConverter))] + public partial interface IManagedClusterNodeResourceGroupProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeResourceGroupProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeResourceGroupProfile.TypeConverter.cs new file mode 100644 index 000000000000..bf74f9548547 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeResourceGroupProfile.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterNodeResourceGroupProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterNodeResourceGroupProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterNodeResourceGroupProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterNodeResourceGroupProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeResourceGroupProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeResourceGroupProfile.cs new file mode 100644 index 000000000000..01239fd5f086 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeResourceGroupProfile.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Node resource group lockdown profile for a managed cluster. + public partial class ManagedClusterNodeResourceGroupProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfileInternal + { + + /// Backing field for property. + private string _restrictionLevel; + + /// + /// The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string RestrictionLevel { get => this._restrictionLevel; set => this._restrictionLevel = value; } + + /// Creates an new instance. + public ManagedClusterNodeResourceGroupProfile() + { + + } + } + /// Node resource group lockdown profile for a managed cluster. + public partial interface IManagedClusterNodeResourceGroupProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted'", + SerializedName = @"restrictionLevel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Unrestricted", "ReadOnly")] + string RestrictionLevel { get; set; } + + } + /// Node resource group lockdown profile for a managed cluster. + internal partial interface IManagedClusterNodeResourceGroupProfileInternal + + { + /// + /// The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted' + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Unrestricted", "ReadOnly")] + string RestrictionLevel { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeResourceGroupProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeResourceGroupProfile.json.cs new file mode 100644 index 000000000000..5556455a4326 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterNodeResourceGroupProfile.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Node resource group lockdown profile for a managed cluster. + public partial class ManagedClusterNodeResourceGroupProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterNodeResourceGroupProfile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedClusterNodeResourceGroupProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_restrictionLevel = If( json?.PropertyT("restrictionLevel"), out var __jsonRestrictionLevel) ? (string)__jsonRestrictionLevel : (string)_restrictionLevel;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._restrictionLevel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._restrictionLevel.ToString()) : null, "restrictionLevel" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentity.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentity.cs index 943fa4380692..432f9135ba13 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentity.cs @@ -56,31 +56,31 @@ public partial class ManagedClusterPodIdentity : public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Message; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Code = value ?? null; } /// Internal Acessors for Detail - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Detail = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Detail = value ?? null /* arrayOf */; } /// Internal Acessors for Identity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UserAssignedIdentity()); set { {_identity = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Message = value ?? null; } /// Internal Acessors for ProvisioningErrorBodyError - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningErrorBody Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.ProvisioningErrorBodyError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).ManagedClusterPodIdentityProvisioningErrorBodyError; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).ManagedClusterPodIdentityProvisioningErrorBodyError = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningErrorBody Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.ProvisioningErrorBodyError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).ManagedClusterPodIdentityProvisioningErrorBodyError; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).ManagedClusterPodIdentityProvisioningErrorBodyError = value ?? null /* model class */; } /// Internal Acessors for ProvisioningInfo Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfo Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.ProvisioningInfo { get => (this._provisioningInfo = this._provisioningInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPodIdentityProvisioningInfo()); set { {_provisioningInfo = value;} } } /// Internal Acessors for ProvisioningInfoError - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningError Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.ProvisioningInfoError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Error = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningError Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.ProvisioningInfoError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Error = value ?? null /* model class */; } /// Internal Acessors for ProvisioningState string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Target = value ?? null; } /// Backing field for property. private string _name; diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityException.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityException.PowerShell.cs index 38b213c9df28..b0d5462e7e1b 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityException.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityException.PowerShell.cs @@ -8,7 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; /// - /// See [disable AAD Pod Identity for a specific Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) + /// A pod identity exception, which allows pods with certain labels to access the Azure Instance Metadata Service (IMDS) endpoint + /// without being intercepted by the node-managed identity (NMI) server. See [disable AAD Pod Identity for a specific Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) /// for more details. /// [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityExceptionTypeConverter))] @@ -175,7 +176,8 @@ public override string ToString() return ToJsonString(); } } - /// See [disable AAD Pod Identity for a specific Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) + /// A pod identity exception, which allows pods with certain labels to access the Azure Instance Metadata Service (IMDS) endpoint + /// without being intercepted by the node-managed identity (NMI) server. See [disable AAD Pod Identity for a specific Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) /// for more details. [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityExceptionTypeConverter))] public partial interface IManagedClusterPodIdentityException diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityException.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityException.cs index 1fc131b5506f..a972fb46a38f 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityException.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityException.cs @@ -8,7 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// See [disable AAD Pod Identity for a specific Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) + /// A pod identity exception, which allows pods with certain labels to access the Azure Instance Metadata Service (IMDS) endpoint + /// without being intercepted by the node-managed identity (NMI) server. See [disable AAD Pod Identity for a specific Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) /// for more details. /// public partial class ManagedClusterPodIdentityException : @@ -43,7 +44,8 @@ public ManagedClusterPodIdentityException() } } - /// See [disable AAD Pod Identity for a specific Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) + /// A pod identity exception, which allows pods with certain labels to access the Azure Instance Metadata Service (IMDS) endpoint + /// without being intercepted by the node-managed identity (NMI) server. See [disable AAD Pod Identity for a specific Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) /// for more details. public partial interface IManagedClusterPodIdentityException : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable @@ -83,7 +85,8 @@ public partial interface IManagedClusterPodIdentityException : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityExceptionPodLabels PodLabel { get; set; } } - /// See [disable AAD Pod Identity for a specific Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) + /// A pod identity exception, which allows pods with certain labels to access the Azure Instance Metadata Service (IMDS) endpoint + /// without being intercepted by the node-managed identity (NMI) server. See [disable AAD Pod Identity for a specific Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) /// for more details. internal partial interface IManagedClusterPodIdentityExceptionInternal diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityException.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityException.json.cs index 31f98f6b2373..8c079e70a3a0 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityException.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityException.json.cs @@ -8,7 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// See [disable AAD Pod Identity for a specific Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) + /// A pod identity exception, which allows pods with certain labels to access the Azure Instance Metadata Service (IMDS) endpoint + /// without being intercepted by the node-managed identity (NMI) server. See [disable AAD Pod Identity for a specific Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) /// for more details. /// public partial class ManagedClusterPodIdentityException diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProfile.PowerShell.cs index 8be676299193..a458e2b39767 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProfile.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProfile.PowerShell.cs @@ -8,8 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; /// - /// See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on pod identity - /// integration. + /// The pod identity profile of the Managed Cluster. See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on pod identity integration. /// [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityProfileTypeConverter))] public partial class ManagedClusterPodIdentityProfile @@ -181,8 +181,8 @@ public override string ToString() return ToJsonString(); } } - /// See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on pod identity - /// integration. + /// The pod identity profile of the Managed Cluster. See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on pod identity integration. [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityProfileTypeConverter))] public partial interface IManagedClusterPodIdentityProfile diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProfile.cs index d9fecb21e268..8a9bb825542b 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProfile.cs @@ -8,8 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on pod identity - /// integration. + /// The pod identity profile of the Managed Cluster. See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on pod identity integration. /// public partial class ManagedClusterPodIdentityProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProfile, @@ -20,8 +20,9 @@ public partial class ManagedClusterPodIdentityProfile : private bool? _allowNetworkPluginKubenet; /// - /// Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. - /// See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + /// Whether pod identity is allowed to run on clusters with Kubenet networking. Running in Kubenet is disabled by default + /// due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin + /// with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) /// for more information. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] @@ -54,14 +55,15 @@ public ManagedClusterPodIdentityProfile() } } - /// See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on pod identity - /// integration. + /// The pod identity profile of the Managed Cluster. See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on pod identity integration. public partial interface IManagedClusterPodIdentityProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { /// - /// Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. - /// See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + /// Whether pod identity is allowed to run on clusters with Kubenet networking. Running in Kubenet is disabled by default + /// due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin + /// with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) /// for more information. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -70,7 +72,7 @@ public partial interface IManagedClusterPodIdentityProfile : Read = true, Create = true, Update = true, - Description = @"Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) for more information.", + Description = @"Whether pod identity is allowed to run on clusters with Kubenet networking. Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) for more information.", SerializedName = @"allowNetworkPluginKubenet", PossibleTypes = new [] { typeof(bool) })] bool? AllowNetworkPluginKubenet { get; set; } @@ -109,14 +111,15 @@ public partial interface IManagedClusterPodIdentityProfile : System.Collections.Generic.List UserAssignedIdentityException { get; set; } } - /// See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on pod identity - /// integration. + /// The pod identity profile of the Managed Cluster. See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on pod identity integration. internal partial interface IManagedClusterPodIdentityProfileInternal { /// - /// Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. - /// See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + /// Whether pod identity is allowed to run on clusters with Kubenet networking. Running in Kubenet is disabled by default + /// due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin + /// with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) /// for more information. /// bool? AllowNetworkPluginKubenet { get; set; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProfile.json.cs index bff5eefc2f56..4803a223c93d 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProfile.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProfile.json.cs @@ -8,8 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on pod identity - /// integration. + /// The pod identity profile of the Managed Cluster. See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on pod identity integration. /// public partial class ManagedClusterPodIdentityProfile { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProvisioningInfo.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProvisioningInfo.cs index d64fb416570c..be61f5450375 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProvisioningInfo.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPodIdentityProvisioningInfo.cs @@ -39,7 +39,7 @@ public partial class ManagedClusterPodIdentityProvisioningInfo : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningError Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPodIdentityProvisioningError()); set { {_error = value;} } } /// Internal Acessors for ManagedClusterPodIdentityProvisioningErrorBodyError - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningErrorBody Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal.ManagedClusterPodIdentityProvisioningErrorBodyError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningErrorInternal)Error).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningErrorInternal)Error).Error = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningErrorBody Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningInfoInternal.ManagedClusterPodIdentityProvisioningErrorBodyError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningErrorInternal)Error).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProvisioningErrorInternal)Error).Error = value ?? null /* model class */; } /// /// The target of the particular error. For example, the name of the property in error. diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterProperties.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterProperties.PowerShell.cs index 065b8532a2e8..de370e00369c 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterProperties.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterProperties.PowerShell.cs @@ -133,6 +133,10 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterOidcIssuerProfileTypeConverter.ConvertFrom); } + if (content.Contains("NodeResourceGroupProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeResourceGroupProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile) content.GetValueForProperty("NodeResourceGroupProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeResourceGroupProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeResourceGroupProfileTypeConverter.ConvertFrom); + } if (content.Contains("AadProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAadProfileTypeConverter.ConvertFrom); @@ -141,6 +145,10 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoUpgradeProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfile) content.GetValueForProperty("AutoUpgradeProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoUpgradeProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAutoUpgradeProfileTypeConverter.ConvertFrom); } + if (content.Contains("UpgradeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ClusterUpgradeSettingsTypeConverter.ConvertFrom); + } if (content.Contains("AutoScalerProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfile) content.GetValueForProperty("AutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPropertiesAutoScalerProfileTypeConverter.ConvertFrom); @@ -161,6 +169,10 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileTypeConverter.ConvertFrom); } + if (content.Contains("IngressProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IngressProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile) content.GetValueForProperty("IngressProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IngressProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileTypeConverter.ConvertFrom); + } if (content.Contains("WorkloadAutoScalerProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfile) content.GetValueForProperty("WorkloadAutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileTypeConverter.ConvertFrom); @@ -169,6 +181,30 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AzureMonitorProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfile) content.GetValueForProperty("AzureMonitorProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AzureMonitorProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfileTypeConverter.ConvertFrom); } + if (content.Contains("ServiceMeshProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ServiceMeshProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile) content.GetValueForProperty("ServiceMeshProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ServiceMeshProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ServiceMeshProfileTypeConverter.ConvertFrom); + } + if (content.Contains("MetricsProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile) content.GetValueForProperty("MetricsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterMetricsProfileTypeConverter.ConvertFrom); + } + if (content.Contains("NodeProvisioningProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeProvisioningProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile) content.GetValueForProperty("NodeProvisioningProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeProvisioningProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeProvisioningProfileTypeConverter.ConvertFrom); + } + if (content.Contains("BootstrapProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BootstrapProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile) content.GetValueForProperty("BootstrapProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BootstrapProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterBootstrapProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AiToolchainOperatorProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AiToolchainOperatorProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile) content.GetValueForProperty("AiToolchainOperatorProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AiToolchainOperatorProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAiToolchainOperatorProfileTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStatusTypeConverter.ConvertFrom); + } if (content.Contains("ProvisioningState")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); @@ -221,9 +257,9 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).EnableRbac = (bool?) content.GetValueForProperty("EnableRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).EnableRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("EnablePodSecurityPolicy")) + if (content.Contains("SupportPlan")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).EnablePodSecurityPolicy = (bool?) content.GetValueForProperty("EnablePodSecurityPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).EnablePodSecurityPolicy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SupportPlan = (string) content.GetValueForProperty("SupportPlan",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SupportPlan, global::System.Convert.ToString); } if (content.Contains("DiskEncryptionSetId")) { @@ -245,6 +281,10 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PublicNetworkAccess, global::System.Convert.ToString); } + if (content.Contains("ResourceUid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ResourceUid = (string) content.GetValueForProperty("ResourceUid",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ResourceUid, global::System.Convert.ToString); + } if (content.Contains("NetworkProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceNetworkProfileTypeConverter.ConvertFrom); @@ -257,6 +297,10 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WindowProfileLicenseType = (string) content.GetValueForProperty("WindowProfileLicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WindowProfileLicenseType, global::System.Convert.ToString); } + if (content.Contains("NodeResourceGroupProfileRestrictionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeResourceGroupProfileRestrictionLevel = (string) content.GetValueForProperty("NodeResourceGroupProfileRestrictionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeResourceGroupProfileRestrictionLevel, global::System.Convert.ToString); + } if (content.Contains("AutoUpgradeProfileUpgradeChannel")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoUpgradeProfileUpgradeChannel = (string) content.GetValueForProperty("AutoUpgradeProfileUpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoUpgradeProfileUpgradeChannel, global::System.Convert.ToString); @@ -265,6 +309,10 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileExpander = (string) content.GetValueForProperty("AutoScalerProfileExpander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileExpander, global::System.Convert.ToString); } + if (content.Contains("BootstrapProfileArtifactSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BootstrapProfileArtifactSource = (string) content.GetValueForProperty("BootstrapProfileArtifactSource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BootstrapProfileArtifactSource, global::System.Convert.ToString); + } if (content.Contains("LinuxProfileSsh")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).LinuxProfileSsh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceSshConfiguration) content.GetValueForProperty("LinuxProfileSsh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).LinuxProfileSsh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); @@ -349,10 +397,30 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AadProfileTenantId, global::System.Convert.ToString); } + if (content.Contains("AutoUpgradeProfileNodeOSUpgradeChannel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoUpgradeProfileNodeOSUpgradeChannel = (string) content.GetValueForProperty("AutoUpgradeProfileNodeOSUpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoUpgradeProfileNodeOSUpgradeChannel, global::System.Convert.ToString); + } + if (content.Contains("UpgradeSettingOverrideSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).UpgradeSettingOverrideSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings) content.GetValueForProperty("UpgradeSettingOverrideSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).UpgradeSettingOverrideSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UpgradeOverrideSettingsTypeConverter.ConvertFrom); + } if (content.Contains("AutoScalerProfileBalanceSimilarNodeGroup")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileBalanceSimilarNodeGroup = (string) content.GetValueForProperty("AutoScalerProfileBalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileBalanceSimilarNodeGroup, global::System.Convert.ToString); } + if (content.Contains("AutoScalerProfileDaemonsetEvictionForEmptyNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileDaemonsetEvictionForEmptyNode = (bool?) content.GetValueForProperty("AutoScalerProfileDaemonsetEvictionForEmptyNode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileDaemonsetEvictionForEmptyNode, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoScalerProfileDaemonsetEvictionForOccupiedNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileDaemonsetEvictionForOccupiedNode = (bool?) content.GetValueForProperty("AutoScalerProfileDaemonsetEvictionForOccupiedNode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileDaemonsetEvictionForOccupiedNode, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoScalerProfileIgnoreDaemonsetsUtilization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileIgnoreDaemonsetsUtilization = (bool?) content.GetValueForProperty("AutoScalerProfileIgnoreDaemonsetsUtilization",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileIgnoreDaemonsetsUtilization, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("AutoScalerProfileMaxEmptyBulkDelete")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxEmptyBulkDelete = (string) content.GetValueForProperty("AutoScalerProfileMaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxEmptyBulkDelete, global::System.Convert.ToString); @@ -433,6 +501,14 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileDisableRunCommand = (bool?) content.GetValueForProperty("ApiServerAccessProfileDisableRunCommand",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileDisableRunCommand, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("ApiServerAccessProfileEnableVnetIntegration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnableVnetIntegration = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnableVnetIntegration",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnableVnetIntegration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApiServerAccessProfileSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileSubnetId = (string) content.GetValueForProperty("ApiServerAccessProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileSubnetId, global::System.Convert.ToString); + } if (content.Contains("HttpProxyConfigHttpProxy")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).HttpProxyConfigHttpProxy = (string) content.GetValueForProperty("HttpProxyConfigHttpProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).HttpProxyConfigHttpProxy, global::System.Convert.ToString); @@ -465,6 +541,10 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SecurityProfileImageCleaner = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileImageCleaner) content.GetValueForProperty("SecurityProfileImageCleaner",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SecurityProfileImageCleaner, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfileImageCleanerTypeConverter.ConvertFrom); } + if (content.Contains("SecurityProfileCustomCaTrustCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SecurityProfileCustomCaTrustCertificate = (System.Collections.Generic.List) content.GetValueForProperty("SecurityProfileCustomCaTrustCertificate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SecurityProfileCustomCaTrustCertificate, __y => TypeConverterExtensions.SelectToList(__y, i => i)); + } if (content.Contains("AzureKeyVaultKmKeyId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyId, global::System.Convert.ToString); @@ -485,14 +565,62 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).StorageProfileBlobCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileBlobCsiDriver) content.GetValueForProperty("StorageProfileBlobCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).StorageProfileBlobCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileBlobCsiDriverTypeConverter.ConvertFrom); } + if (content.Contains("IngressProfileWebAppRouting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IngressProfileWebAppRouting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting) content.GetValueForProperty("IngressProfileWebAppRouting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IngressProfileWebAppRouting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileWebAppRoutingTypeConverter.ConvertFrom); + } if (content.Contains("WorkloadAutoScalerProfileKeda")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfileKeda = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileKeda) content.GetValueForProperty("WorkloadAutoScalerProfileKeda",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfileKeda, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter.ConvertFrom); } + if (content.Contains("WorkloadAutoScalerProfileVerticalPodAutoscaler")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfileVerticalPodAutoscaler = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) content.GetValueForProperty("WorkloadAutoScalerProfileVerticalPodAutoscaler",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfileVerticalPodAutoscaler, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerTypeConverter.ConvertFrom); + } if (content.Contains("AzureMonitorProfileMetric")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AzureMonitorProfileMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetrics) content.GetValueForProperty("AzureMonitorProfileMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AzureMonitorProfileMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfileMetricsTypeConverter.ConvertFrom); } + if (content.Contains("ServiceMeshProfileIstio")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ServiceMeshProfileIstio = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh) content.GetValueForProperty("ServiceMeshProfileIstio",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ServiceMeshProfileIstio, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioServiceMeshTypeConverter.ConvertFrom); + } + if (content.Contains("ServiceMeshProfileMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ServiceMeshProfileMode = (string) content.GetValueForProperty("ServiceMeshProfileMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ServiceMeshProfileMode, global::System.Convert.ToString); + } + if (content.Contains("IstioComponent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IstioComponent = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents) content.GetValueForProperty("IstioComponent",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IstioComponent, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioComponentsTypeConverter.ConvertFrom); + } + if (content.Contains("IstioCertificateAuthority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IstioCertificateAuthority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority) content.GetValueForProperty("IstioCertificateAuthority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IstioCertificateAuthority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("MetricProfileCostAnalysis")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricProfileCostAnalysis = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis) content.GetValueForProperty("MetricProfileCostAnalysis",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricProfileCostAnalysis, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterCostAnalysisTypeConverter.ConvertFrom); + } + if (content.Contains("NodeProvisioningProfileMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeProvisioningProfileMode = (string) content.GetValueForProperty("NodeProvisioningProfileMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeProvisioningProfileMode, global::System.Convert.ToString); + } + if (content.Contains("NodeProvisioningProfileDefaultNodePool")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeProvisioningProfileDefaultNodePool = (string) content.GetValueForProperty("NodeProvisioningProfileDefaultNodePool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeProvisioningProfileDefaultNodePool, global::System.Convert.ToString); + } + if (content.Contains("BootstrapProfileContainerRegistryId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BootstrapProfileContainerRegistryId = (string) content.GetValueForProperty("BootstrapProfileContainerRegistryId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BootstrapProfileContainerRegistryId, global::System.Convert.ToString); + } + if (content.Contains("AiToolchainOperatorProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AiToolchainOperatorProfileEnabled = (bool?) content.GetValueForProperty("AiToolchainOperatorProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AiToolchainOperatorProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("StatusProvisioningError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).StatusProvisioningError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("StatusProvisioningError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).StatusProvisioningError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } if (content.Contains("SshPublicKey")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SshPublicKey = (System.Collections.Generic.List) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); @@ -509,6 +637,14 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).GmsaProfileRootDomainName = (string) content.GetValueForProperty("GmsaProfileRootDomainName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).GmsaProfileRootDomainName, global::System.Convert.ToString); } + if (content.Contains("OverrideSettingForceUpgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).OverrideSettingForceUpgrade = (bool?) content.GetValueForProperty("OverrideSettingForceUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).OverrideSettingForceUpgrade, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("OverrideSettingUntil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).OverrideSettingUntil = (global::System.DateTime?) content.GetValueForProperty("OverrideSettingUntil",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).OverrideSettingUntil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } if (content.Contains("DefenderSecurityMonitoring")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).DefenderSecurityMonitoring = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderSecurityMonitoring) content.GetValueForProperty("DefenderSecurityMonitoring",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).DefenderSecurityMonitoring, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter.ConvertFrom); @@ -557,10 +693,30 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BlobCsiDriverEnabled = (bool?) content.GetValueForProperty("BlobCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BlobCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("WebAppRoutingNginx")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingNginx = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx) content.GetValueForProperty("WebAppRoutingNginx",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingNginx, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileNginxTypeConverter.ConvertFrom); + } + if (content.Contains("WebAppRoutingIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity) content.GetValueForProperty("WebAppRoutingIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UserAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("WebAppRoutingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingEnabled = (bool?) content.GetValueForProperty("WebAppRoutingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("WebAppRoutingDnsZoneResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingDnsZoneResourceId = (System.Collections.Generic.List) content.GetValueForProperty("WebAppRoutingDnsZoneResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingDnsZoneResourceId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } if (content.Contains("KedaEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).KedaEnabled = (bool?) content.GetValueForProperty("KedaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).KedaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("VerticalPodAutoscalerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).VerticalPodAutoscalerEnabled = (bool?) content.GetValueForProperty("VerticalPodAutoscalerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).VerticalPodAutoscalerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("MetricKubeStateMetric")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricKubeStateMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileKubeStateMetrics) content.GetValueForProperty("MetricKubeStateMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricKubeStateMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter.ConvertFrom); @@ -569,10 +725,62 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricEnabled = (bool?) content.GetValueForProperty("MetricEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("IstioRevision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IstioRevision = (System.Collections.Generic.List) content.GetValueForProperty("IstioRevision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IstioRevision, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ComponentIngressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ComponentIngressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentIngressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ComponentIngressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioIngressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("ComponentEgressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ComponentEgressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentEgressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ComponentEgressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioEgressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("CostAnalysisEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).CostAnalysisEnabled = (bool?) content.GetValueForProperty("CostAnalysisEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).CostAnalysisEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorCode = (string) content.GetValueForProperty("ProvisioningErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorMessage = (string) content.GetValueForProperty("ProvisioningErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorTarget = (string) content.GetValueForProperty("ProvisioningErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorTarget, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorDetail = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } if (content.Contains("SecurityMonitoringEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SecurityMonitoringEnabled = (bool?) content.GetValueForProperty("SecurityMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SecurityMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("NginxDefaultIngressControllerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NginxDefaultIngressControllerType = (string) content.GetValueForProperty("NginxDefaultIngressControllerType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NginxDefaultIngressControllerType, global::System.Convert.ToString); + } + if (content.Contains("IdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IdentityResourceId, global::System.Convert.ToString); + } + if (content.Contains("IdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IdentityClientId = (string) content.GetValueForProperty("IdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IdentityClientId, global::System.Convert.ToString); + } + if (content.Contains("IdentityObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IdentityObjectId = (string) content.GetValueForProperty("IdentityObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IdentityObjectId, global::System.Convert.ToString); + } if (content.Contains("KubeStateMetricLabelsAllowlist")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).KubeStateMetricLabelsAllowlist = (string) content.GetValueForProperty("KubeStateMetricLabelsAllowlist",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).KubeStateMetricLabelsAllowlist, global::System.Convert.ToString); @@ -581,6 +789,30 @@ internal ManagedClusterProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).KubeStateMetricAnnotationsAllowList = (string) content.GetValueForProperty("KubeStateMetricAnnotationsAllowList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).KubeStateMetricAnnotationsAllowList, global::System.Convert.ToString); } + if (content.Contains("CertificateAuthorityPlugin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).CertificateAuthorityPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority) content.GetValueForProperty("CertificateAuthorityPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).CertificateAuthorityPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("PluginKeyVaultId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginKeyVaultId = (string) content.GetValueForProperty("PluginKeyVaultId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginKeyVaultId, global::System.Convert.ToString); + } + if (content.Contains("PluginCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginCertObjectName = (string) content.GetValueForProperty("PluginCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginKeyObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginKeyObjectName = (string) content.GetValueForProperty("PluginKeyObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginKeyObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginRootCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginRootCertObjectName = (string) content.GetValueForProperty("PluginRootCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginRootCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginCertChainObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginCertChainObjectName = (string) content.GetValueForProperty("PluginCertChainObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginCertChainObjectName, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -622,6 +854,10 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterOidcIssuerProfileTypeConverter.ConvertFrom); } + if (content.Contains("NodeResourceGroupProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeResourceGroupProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile) content.GetValueForProperty("NodeResourceGroupProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeResourceGroupProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeResourceGroupProfileTypeConverter.ConvertFrom); + } if (content.Contains("AadProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAadProfileTypeConverter.ConvertFrom); @@ -630,6 +866,10 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoUpgradeProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfile) content.GetValueForProperty("AutoUpgradeProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoUpgradeProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAutoUpgradeProfileTypeConverter.ConvertFrom); } + if (content.Contains("UpgradeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ClusterUpgradeSettingsTypeConverter.ConvertFrom); + } if (content.Contains("AutoScalerProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfile) content.GetValueForProperty("AutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPropertiesAutoScalerProfileTypeConverter.ConvertFrom); @@ -650,6 +890,10 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileTypeConverter.ConvertFrom); } + if (content.Contains("IngressProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IngressProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile) content.GetValueForProperty("IngressProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IngressProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileTypeConverter.ConvertFrom); + } if (content.Contains("WorkloadAutoScalerProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfile) content.GetValueForProperty("WorkloadAutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileTypeConverter.ConvertFrom); @@ -658,6 +902,30 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AzureMonitorProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfile) content.GetValueForProperty("AzureMonitorProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AzureMonitorProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfileTypeConverter.ConvertFrom); } + if (content.Contains("ServiceMeshProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ServiceMeshProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile) content.GetValueForProperty("ServiceMeshProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ServiceMeshProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ServiceMeshProfileTypeConverter.ConvertFrom); + } + if (content.Contains("MetricsProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile) content.GetValueForProperty("MetricsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterMetricsProfileTypeConverter.ConvertFrom); + } + if (content.Contains("NodeProvisioningProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeProvisioningProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile) content.GetValueForProperty("NodeProvisioningProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeProvisioningProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeProvisioningProfileTypeConverter.ConvertFrom); + } + if (content.Contains("BootstrapProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BootstrapProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile) content.GetValueForProperty("BootstrapProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BootstrapProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterBootstrapProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AiToolchainOperatorProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AiToolchainOperatorProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile) content.GetValueForProperty("AiToolchainOperatorProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AiToolchainOperatorProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAiToolchainOperatorProfileTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStatusTypeConverter.ConvertFrom); + } if (content.Contains("ProvisioningState")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); @@ -710,9 +978,9 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).EnableRbac = (bool?) content.GetValueForProperty("EnableRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).EnableRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("EnablePodSecurityPolicy")) + if (content.Contains("SupportPlan")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).EnablePodSecurityPolicy = (bool?) content.GetValueForProperty("EnablePodSecurityPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).EnablePodSecurityPolicy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SupportPlan = (string) content.GetValueForProperty("SupportPlan",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SupportPlan, global::System.Convert.ToString); } if (content.Contains("DiskEncryptionSetId")) { @@ -734,6 +1002,10 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PublicNetworkAccess, global::System.Convert.ToString); } + if (content.Contains("ResourceUid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ResourceUid = (string) content.GetValueForProperty("ResourceUid",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ResourceUid, global::System.Convert.ToString); + } if (content.Contains("NetworkProfile")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceNetworkProfileTypeConverter.ConvertFrom); @@ -746,6 +1018,10 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WindowProfileLicenseType = (string) content.GetValueForProperty("WindowProfileLicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WindowProfileLicenseType, global::System.Convert.ToString); } + if (content.Contains("NodeResourceGroupProfileRestrictionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeResourceGroupProfileRestrictionLevel = (string) content.GetValueForProperty("NodeResourceGroupProfileRestrictionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeResourceGroupProfileRestrictionLevel, global::System.Convert.ToString); + } if (content.Contains("AutoUpgradeProfileUpgradeChannel")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoUpgradeProfileUpgradeChannel = (string) content.GetValueForProperty("AutoUpgradeProfileUpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoUpgradeProfileUpgradeChannel, global::System.Convert.ToString); @@ -754,6 +1030,10 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileExpander = (string) content.GetValueForProperty("AutoScalerProfileExpander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileExpander, global::System.Convert.ToString); } + if (content.Contains("BootstrapProfileArtifactSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BootstrapProfileArtifactSource = (string) content.GetValueForProperty("BootstrapProfileArtifactSource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BootstrapProfileArtifactSource, global::System.Convert.ToString); + } if (content.Contains("LinuxProfileSsh")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).LinuxProfileSsh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceSshConfiguration) content.GetValueForProperty("LinuxProfileSsh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).LinuxProfileSsh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); @@ -838,10 +1118,30 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AadProfileTenantId, global::System.Convert.ToString); } + if (content.Contains("AutoUpgradeProfileNodeOSUpgradeChannel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoUpgradeProfileNodeOSUpgradeChannel = (string) content.GetValueForProperty("AutoUpgradeProfileNodeOSUpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoUpgradeProfileNodeOSUpgradeChannel, global::System.Convert.ToString); + } + if (content.Contains("UpgradeSettingOverrideSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).UpgradeSettingOverrideSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings) content.GetValueForProperty("UpgradeSettingOverrideSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).UpgradeSettingOverrideSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UpgradeOverrideSettingsTypeConverter.ConvertFrom); + } if (content.Contains("AutoScalerProfileBalanceSimilarNodeGroup")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileBalanceSimilarNodeGroup = (string) content.GetValueForProperty("AutoScalerProfileBalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileBalanceSimilarNodeGroup, global::System.Convert.ToString); } + if (content.Contains("AutoScalerProfileDaemonsetEvictionForEmptyNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileDaemonsetEvictionForEmptyNode = (bool?) content.GetValueForProperty("AutoScalerProfileDaemonsetEvictionForEmptyNode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileDaemonsetEvictionForEmptyNode, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoScalerProfileDaemonsetEvictionForOccupiedNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileDaemonsetEvictionForOccupiedNode = (bool?) content.GetValueForProperty("AutoScalerProfileDaemonsetEvictionForOccupiedNode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileDaemonsetEvictionForOccupiedNode, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoScalerProfileIgnoreDaemonsetsUtilization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileIgnoreDaemonsetsUtilization = (bool?) content.GetValueForProperty("AutoScalerProfileIgnoreDaemonsetsUtilization",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileIgnoreDaemonsetsUtilization, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("AutoScalerProfileMaxEmptyBulkDelete")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxEmptyBulkDelete = (string) content.GetValueForProperty("AutoScalerProfileMaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxEmptyBulkDelete, global::System.Convert.ToString); @@ -922,6 +1222,14 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileDisableRunCommand = (bool?) content.GetValueForProperty("ApiServerAccessProfileDisableRunCommand",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileDisableRunCommand, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("ApiServerAccessProfileEnableVnetIntegration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnableVnetIntegration = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnableVnetIntegration",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnableVnetIntegration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApiServerAccessProfileSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileSubnetId = (string) content.GetValueForProperty("ApiServerAccessProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileSubnetId, global::System.Convert.ToString); + } if (content.Contains("HttpProxyConfigHttpProxy")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).HttpProxyConfigHttpProxy = (string) content.GetValueForProperty("HttpProxyConfigHttpProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).HttpProxyConfigHttpProxy, global::System.Convert.ToString); @@ -954,6 +1262,10 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SecurityProfileImageCleaner = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileImageCleaner) content.GetValueForProperty("SecurityProfileImageCleaner",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SecurityProfileImageCleaner, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfileImageCleanerTypeConverter.ConvertFrom); } + if (content.Contains("SecurityProfileCustomCaTrustCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SecurityProfileCustomCaTrustCertificate = (System.Collections.Generic.List) content.GetValueForProperty("SecurityProfileCustomCaTrustCertificate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SecurityProfileCustomCaTrustCertificate, __y => TypeConverterExtensions.SelectToList(__y, i => i)); + } if (content.Contains("AzureKeyVaultKmKeyId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyId, global::System.Convert.ToString); @@ -974,14 +1286,62 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).StorageProfileBlobCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileBlobCsiDriver) content.GetValueForProperty("StorageProfileBlobCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).StorageProfileBlobCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfileBlobCsiDriverTypeConverter.ConvertFrom); } + if (content.Contains("IngressProfileWebAppRouting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IngressProfileWebAppRouting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting) content.GetValueForProperty("IngressProfileWebAppRouting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IngressProfileWebAppRouting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileWebAppRoutingTypeConverter.ConvertFrom); + } if (content.Contains("WorkloadAutoScalerProfileKeda")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfileKeda = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileKeda) content.GetValueForProperty("WorkloadAutoScalerProfileKeda",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfileKeda, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter.ConvertFrom); } + if (content.Contains("WorkloadAutoScalerProfileVerticalPodAutoscaler")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfileVerticalPodAutoscaler = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) content.GetValueForProperty("WorkloadAutoScalerProfileVerticalPodAutoscaler",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfileVerticalPodAutoscaler, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerTypeConverter.ConvertFrom); + } if (content.Contains("AzureMonitorProfileMetric")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AzureMonitorProfileMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetrics) content.GetValueForProperty("AzureMonitorProfileMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AzureMonitorProfileMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfileMetricsTypeConverter.ConvertFrom); } + if (content.Contains("ServiceMeshProfileIstio")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ServiceMeshProfileIstio = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh) content.GetValueForProperty("ServiceMeshProfileIstio",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ServiceMeshProfileIstio, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioServiceMeshTypeConverter.ConvertFrom); + } + if (content.Contains("ServiceMeshProfileMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ServiceMeshProfileMode = (string) content.GetValueForProperty("ServiceMeshProfileMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ServiceMeshProfileMode, global::System.Convert.ToString); + } + if (content.Contains("IstioComponent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IstioComponent = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents) content.GetValueForProperty("IstioComponent",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IstioComponent, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioComponentsTypeConverter.ConvertFrom); + } + if (content.Contains("IstioCertificateAuthority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IstioCertificateAuthority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority) content.GetValueForProperty("IstioCertificateAuthority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IstioCertificateAuthority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("MetricProfileCostAnalysis")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricProfileCostAnalysis = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis) content.GetValueForProperty("MetricProfileCostAnalysis",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricProfileCostAnalysis, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterCostAnalysisTypeConverter.ConvertFrom); + } + if (content.Contains("NodeProvisioningProfileMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeProvisioningProfileMode = (string) content.GetValueForProperty("NodeProvisioningProfileMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeProvisioningProfileMode, global::System.Convert.ToString); + } + if (content.Contains("NodeProvisioningProfileDefaultNodePool")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeProvisioningProfileDefaultNodePool = (string) content.GetValueForProperty("NodeProvisioningProfileDefaultNodePool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NodeProvisioningProfileDefaultNodePool, global::System.Convert.ToString); + } + if (content.Contains("BootstrapProfileContainerRegistryId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BootstrapProfileContainerRegistryId = (string) content.GetValueForProperty("BootstrapProfileContainerRegistryId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BootstrapProfileContainerRegistryId, global::System.Convert.ToString); + } + if (content.Contains("AiToolchainOperatorProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AiToolchainOperatorProfileEnabled = (bool?) content.GetValueForProperty("AiToolchainOperatorProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).AiToolchainOperatorProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("StatusProvisioningError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).StatusProvisioningError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("StatusProvisioningError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).StatusProvisioningError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } if (content.Contains("SshPublicKey")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SshPublicKey = (System.Collections.Generic.List) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); @@ -998,6 +1358,14 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).GmsaProfileRootDomainName = (string) content.GetValueForProperty("GmsaProfileRootDomainName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).GmsaProfileRootDomainName, global::System.Convert.ToString); } + if (content.Contains("OverrideSettingForceUpgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).OverrideSettingForceUpgrade = (bool?) content.GetValueForProperty("OverrideSettingForceUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).OverrideSettingForceUpgrade, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("OverrideSettingUntil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).OverrideSettingUntil = (global::System.DateTime?) content.GetValueForProperty("OverrideSettingUntil",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).OverrideSettingUntil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } if (content.Contains("DefenderSecurityMonitoring")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).DefenderSecurityMonitoring = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderSecurityMonitoring) content.GetValueForProperty("DefenderSecurityMonitoring",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).DefenderSecurityMonitoring, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter.ConvertFrom); @@ -1046,10 +1414,30 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BlobCsiDriverEnabled = (bool?) content.GetValueForProperty("BlobCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).BlobCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("WebAppRoutingNginx")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingNginx = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx) content.GetValueForProperty("WebAppRoutingNginx",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingNginx, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfileNginxTypeConverter.ConvertFrom); + } + if (content.Contains("WebAppRoutingIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity) content.GetValueForProperty("WebAppRoutingIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.UserAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("WebAppRoutingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingEnabled = (bool?) content.GetValueForProperty("WebAppRoutingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("WebAppRoutingDnsZoneResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingDnsZoneResourceId = (System.Collections.Generic.List) content.GetValueForProperty("WebAppRoutingDnsZoneResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).WebAppRoutingDnsZoneResourceId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } if (content.Contains("KedaEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).KedaEnabled = (bool?) content.GetValueForProperty("KedaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).KedaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("VerticalPodAutoscalerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).VerticalPodAutoscalerEnabled = (bool?) content.GetValueForProperty("VerticalPodAutoscalerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).VerticalPodAutoscalerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("MetricKubeStateMetric")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricKubeStateMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileKubeStateMetrics) content.GetValueForProperty("MetricKubeStateMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricKubeStateMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter.ConvertFrom); @@ -1058,10 +1446,62 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricEnabled = (bool?) content.GetValueForProperty("MetricEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).MetricEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("IstioRevision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IstioRevision = (System.Collections.Generic.List) content.GetValueForProperty("IstioRevision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IstioRevision, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ComponentIngressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ComponentIngressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentIngressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ComponentIngressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioIngressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("ComponentEgressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ComponentEgressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentEgressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ComponentEgressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioEgressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("CostAnalysisEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).CostAnalysisEnabled = (bool?) content.GetValueForProperty("CostAnalysisEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).CostAnalysisEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorCode = (string) content.GetValueForProperty("ProvisioningErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorMessage = (string) content.GetValueForProperty("ProvisioningErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorTarget = (string) content.GetValueForProperty("ProvisioningErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorTarget, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorDetail = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).ProvisioningErrorAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } if (content.Contains("SecurityMonitoringEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SecurityMonitoringEnabled = (bool?) content.GetValueForProperty("SecurityMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).SecurityMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("NginxDefaultIngressControllerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NginxDefaultIngressControllerType = (string) content.GetValueForProperty("NginxDefaultIngressControllerType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).NginxDefaultIngressControllerType, global::System.Convert.ToString); + } + if (content.Contains("IdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IdentityResourceId, global::System.Convert.ToString); + } + if (content.Contains("IdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IdentityClientId = (string) content.GetValueForProperty("IdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IdentityClientId, global::System.Convert.ToString); + } + if (content.Contains("IdentityObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IdentityObjectId = (string) content.GetValueForProperty("IdentityObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).IdentityObjectId, global::System.Convert.ToString); + } if (content.Contains("KubeStateMetricLabelsAllowlist")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).KubeStateMetricLabelsAllowlist = (string) content.GetValueForProperty("KubeStateMetricLabelsAllowlist",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).KubeStateMetricLabelsAllowlist, global::System.Convert.ToString); @@ -1070,6 +1510,30 @@ internal ManagedClusterProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).KubeStateMetricAnnotationsAllowList = (string) content.GetValueForProperty("KubeStateMetricAnnotationsAllowList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).KubeStateMetricAnnotationsAllowList, global::System.Convert.ToString); } + if (content.Contains("CertificateAuthorityPlugin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).CertificateAuthorityPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority) content.GetValueForProperty("CertificateAuthorityPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).CertificateAuthorityPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("PluginKeyVaultId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginKeyVaultId = (string) content.GetValueForProperty("PluginKeyVaultId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginKeyVaultId, global::System.Convert.ToString); + } + if (content.Contains("PluginCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginCertObjectName = (string) content.GetValueForProperty("PluginCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginKeyObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginKeyObjectName = (string) content.GetValueForProperty("PluginKeyObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginKeyObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginRootCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginRootCertObjectName = (string) content.GetValueForProperty("PluginRootCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginRootCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginCertChainObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginCertChainObjectName = (string) content.GetValueForProperty("PluginCertChainObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal)this).PluginCertChainObjectName, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterProperties.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterProperties.cs index fcf032f357ae..45f3e9fa30ef 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterProperties.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterProperties.cs @@ -70,6 +70,19 @@ public partial class ManagedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public System.Collections.Generic.List AgentPoolProfile { get => this._agentPoolProfile; set => this._agentPoolProfile = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile _aiToolchainOperatorProfile; + + /// AI toolchain operator settings that apply to the whole cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile AiToolchainOperatorProfile { get => (this._aiToolchainOperatorProfile = this._aiToolchainOperatorProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAiToolchainOperatorProfile()); set => this._aiToolchainOperatorProfile = value; } + + /// + /// Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain operator enabled or not. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AiToolchainOperatorProfileEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfileInternal)AiToolchainOperatorProfile).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfileInternal)AiToolchainOperatorProfile).Enabled = value ?? default(bool); } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfile _apiServerAccessProfile; @@ -78,9 +91,9 @@ public partial class ManagedClusterProperties : internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfile ApiServerAccessProfile { get => (this._apiServerAccessProfile = this._apiServerAccessProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterApiServerAccessProfile()); set => this._apiServerAccessProfile = value; } /// - /// IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use - /// Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized - /// IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + /// The IP ranges authorized to access the Kubernetes API server. IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + /// This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. + /// For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public System.Collections.Generic.List ApiServerAccessProfileAuthorizedIPRange { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).AuthorizedIPRange; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).AuthorizedIPRange = value ?? null /* arrayOf */; } @@ -90,7 +103,7 @@ public partial class ManagedClusterProperties : public bool? ApiServerAccessProfileDisableRunCommand { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).DisableRunCommand; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).DisableRunCommand = value ?? default(bool); } /// - /// For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). + /// Whether to create the cluster as a private cluster or not. For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? ApiServerAccessProfileEnablePrivateCluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).EnablePrivateCluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).EnablePrivateCluster = value ?? default(bool); } @@ -100,12 +113,25 @@ public partial class ManagedClusterProperties : public bool? ApiServerAccessProfileEnablePrivateClusterPublicFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).EnablePrivateClusterPublicFqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).EnablePrivateClusterPublicFqdn = value ?? default(bool); } /// - /// The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). + /// Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? ApiServerAccessProfileEnableVnetIntegration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).EnableVnetIntegration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).EnableVnetIntegration = value ?? default(bool); } + + /// + /// The private DNS zone mode for the cluster. The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). /// Allowed values are 'system' and 'none'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string ApiServerAccessProfilePrivateDnsZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).PrivateDnsZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).PrivateDnsZone = value ?? null; } + /// + /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with BYO + /// Vnet, or when updating an existing cluster to enable apiserver vnet integration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ApiServerAccessProfileSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).SubnetId = value ?? null; } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfile _autoScalerProfile; @@ -113,91 +139,145 @@ public partial class ManagedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfile AutoScalerProfile { get => (this._autoScalerProfile = this._autoScalerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPropertiesAutoScalerProfile()); set => this._autoScalerProfile = value; } - /// Valid values are 'true' and 'false' + /// + /// Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false' + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileBalanceSimilarNodeGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).BalanceSimilarNodeGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).BalanceSimilarNodeGroup = value ?? null; } /// - /// If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + /// DaemonSet pods will be gracefully terminated from empty nodes. If set to true, all daemonset pods on empty nodes will + /// be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AutoScalerProfileDaemonsetEvictionForEmptyNode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).DaemonsetEvictionForEmptyNode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).DaemonsetEvictionForEmptyNode = value ?? default(bool); } + + /// + /// DaemonSet pods will be gracefully terminated from non-empty nodes. If set to true, all daemonset pods on occupied nodes + /// will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AutoScalerProfileDaemonsetEvictionForOccupiedNode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).DaemonsetEvictionForOccupiedNode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).DaemonsetEvictionForOccupiedNode = value ?? default(bool); } + + /// + /// The expander to use when scaling up. If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) /// for more information. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileExpander { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).Expander; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).Expander = value ?? null; } - /// The default is 10. + /// + /// Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the resources + /// used by daemonset will be taken into account when making scaling down decisions. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AutoScalerProfileIgnoreDaemonsetsUtilization { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).IgnoreDaemonsetsUtilization; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).IgnoreDaemonsetsUtilization = value ?? default(bool); } + + /// + /// The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is + /// 10. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileMaxEmptyBulkDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxEmptyBulkDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxEmptyBulkDelete = value ?? null; } - /// The default is 600. + /// + /// The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. The default + /// is 600. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileMaxGracefulTerminationSec { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxGracefulTerminationSec; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxGracefulTerminationSec = value ?? null; } /// - /// The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileMaxNodeProvisionTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxNodeProvisionTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxNodeProvisionTime = value ?? null; } - /// The default is 45. The maximum is 100 and the minimum is 0. + /// + /// The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler halts operations. + /// The default is 45. The maximum is 100 and the minimum is 0. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileMaxTotalUnreadyPercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxTotalUnreadyPercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxTotalUnreadyPercentage = value ?? null; } /// - /// For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all - /// the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be - /// an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + /// Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want CA to + /// act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're + /// a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' + /// for hours, etc). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileNewPodScaleUpDelay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).NewPodScaleUpDelay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).NewPodScaleUpDelay = value ?? null; } - /// This must be an integer. The default is 3. + /// + /// The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default + /// is 3. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileOkTotalUnreadyCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).OkTotalUnreadyCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).OkTotalUnreadyCount = value ?? null; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer followed by + /// an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileScaleDownDelayAfterAdd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterAdd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterAdd = value ?? null; } /// - /// The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) - /// is supported. + /// How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileScaleDownDelayAfterDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterDelete = value ?? null; } /// - /// The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileScaleDownDelayAfterFailure { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterFailure; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterFailure = value ?? null; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileScaleDownUnneededTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUnneededTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUnneededTime = value ?? null; } /// - /// The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long an unready node should be unneeded before it is eligible for scale down. The default is '20m'. Values must be + /// an integer followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileScaleDownUnreadyTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUnreadyTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUnreadyTime = value ?? null; } - /// The default is '0.5'. + /// + /// Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered + /// for scale down. The default is '0.5'. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileScaleDownUtilizationThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUtilizationThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUtilizationThreshold = value ?? null; } - /// The default is '10'. Values must be an integer number of seconds. + /// + /// How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileScanInterval { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScanInterval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScanInterval = value ?? null; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. The default + /// is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileSkipNodesWithLocalStorage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).SkipNodesWithLocalStorage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).SkipNodesWithLocalStorage = value ?? null; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods). The default + /// is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoScalerProfileSkipNodesWithSystemPod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).SkipNodesWithSystemPod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).SkipNodesWithSystemPod = value ?? null; } @@ -209,7 +289,14 @@ public partial class ManagedClusterProperties : internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfile AutoUpgradeProfile { get => (this._autoUpgradeProfile = this._autoUpgradeProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAutoUpgradeProfile()); set => this._autoUpgradeProfile = value; } /// - /// For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + /// Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoUpgradeProfileNodeOSUpgradeChannel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfileInternal)AutoUpgradeProfile).NodeOSUpgradeChannel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfileInternal)AutoUpgradeProfile).NodeOSUpgradeChannel = value ?? null; } + + /// + /// The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster auto-upgrade + /// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AutoUpgradeProfileUpgradeChannel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfileInternal)AutoUpgradeProfile).UpgradeChannel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfileInternal)AutoUpgradeProfile).UpgradeChannel = value ?? null; } @@ -227,9 +314,9 @@ public partial class ManagedClusterProperties : public string AzureKeyVaultKmKeyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKmKeyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKmKeyId = value ?? null; } /// - /// Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public - /// access from all networks. `Private` means the key vault disables public access and enables private link. The default value - /// is `Public`. + /// Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` + /// means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables + /// private link. The default value is `Public`. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AzureKeyVaultKmKeyVaultNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKmKeyVaultNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKmKeyVaultNetworkAccess = value ?? null; } @@ -252,8 +339,10 @@ public partial class ManagedClusterProperties : private string _azurePortalFqdn; /// - /// The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, which Kubernetes - /// APIServer doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal to function properly. + /// 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. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string AzurePortalFqdn { get => this._azurePortalFqdn; } @@ -262,12 +351,46 @@ public partial class ManagedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? BlobCsiDriverEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).BlobCsiDriverEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).BlobCsiDriverEnabled = value ?? default(bool); } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile _bootstrapProfile; + + /// Profile of the cluster bootstrap configuration. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile BootstrapProfile { get => (this._bootstrapProfile = this._bootstrapProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterBootstrapProfile()); set => this._bootstrapProfile = value; } + + /// The artifact source. The source where the artifacts are downloaded from. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string BootstrapProfileArtifactSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfileInternal)BootstrapProfile).ArtifactSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfileInternal)BootstrapProfile).ArtifactSource = value ?? null; } + + /// + /// The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string BootstrapProfileContainerRegistryId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfileInternal)BootstrapProfile).ContainerRegistryId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfileInternal)BootstrapProfile).ContainerRegistryId = value ?? null; } + + /// Istio egress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ComponentEgressGateway { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).ComponentEgressGateway; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).ComponentEgressGateway = value ?? null /* arrayOf */; } + + /// Istio ingress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ComponentIngressGateway { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).ComponentIngressGateway; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).ComponentIngressGateway = value ?? null /* arrayOf */; } + + /// + /// Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. + /// Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If + /// not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? CostAnalysisEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfileInternal)MetricsProfile).CostAnalysisEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfileInternal)MetricsProfile).CostAnalysisEnabled = value ?? default(bool); } + /// Backing field for property. private string _currentKubernetesVersion; /// - /// If kubernetesVersion was a fully specified version , this field will be exactly equal to it. If kubernetesVersion - /// was , this field will contain the full version being used. + /// The version of Kubernetes the Managed Cluster is running. If kubernetesVersion was a fully specified version , + /// this field will be exactly equal to it. If kubernetesVersion was , this field will contain the full + /// version being used. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string CurrentKubernetesVersion { get => this._currentKubernetesVersion; } @@ -284,8 +407,9 @@ public partial class ManagedClusterProperties : private bool? _disableLocalAccount; /// - /// If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters - /// that are AAD enabled. For more details see [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + /// If local accounts should be disabled on the Managed Cluster. If set to true, getting static credentials will be disabled + /// for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see [disable local + /// accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public bool? DisableLocalAccount { get => this._disableLocalAccount; set => this._disableLocalAccount = value; } @@ -298,7 +422,7 @@ public partial class ManagedClusterProperties : private string _diskEncryptionSetId; /// - /// This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' + /// The Resource ID of the disk encryption set to use for enabling encryption at rest. This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string DiskEncryptionSetId { get => this._diskEncryptionSetId; set => this._diskEncryptionSetId = value; } @@ -306,19 +430,11 @@ public partial class ManagedClusterProperties : /// Backing field for property. private string _dnsPrefix; - /// This cannot be updated once the Managed Cluster has been created. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string DnsPrefix { get => this._dnsPrefix; set => this._dnsPrefix = value; } - - /// Backing field for property. - private bool? _enablePodSecurityPolicy; - /// - /// (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes - /// v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + /// The DNS prefix of the Managed Cluster. This cannot be updated once the Managed Cluster has been created. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public bool? EnablePodSecurityPolicy { get => this._enablePodSecurityPolicy; set => this._enablePodSecurityPolicy = value; } + public string DnsPrefix { get => this._dnsPrefix; set => this._dnsPrefix = value; } /// Backing field for property. private bool? _enableRbac; @@ -341,7 +457,10 @@ public partial class ManagedClusterProperties : /// Backing field for property. private string _fqdnSubdomain; - /// This cannot be updated once the Managed Cluster has been created. + /// + /// The FQDN subdomain of the private cluster with custom private dns zone. This cannot be updated once the Managed Cluster + /// has been created. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string FqdnSubdomain { get => this._fqdnSubdomain; set => this._fqdnSubdomain = value; } @@ -352,7 +471,9 @@ public partial class ManagedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string GmsaProfileDnsServer { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfileDnsServer; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfileDnsServer = value ?? null; } - /// Specifies whether to enable Windows gMSA in the managed cluster. + /// + /// Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? GmsaProfileEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfileEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfileEnabled = value ?? default(bool); } @@ -386,13 +507,28 @@ public partial class ManagedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string HttpProxyConfigTrustedCa { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterHttpProxyConfigInternal)HttpProxyConfig).TrustedCa; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterHttpProxyConfigInternal)HttpProxyConfig).TrustedCa = value ?? null; } + /// The client ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string IdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).IdentityClientId; } + + /// The object ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string IdentityObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).IdentityObjectId; } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesIdentityProfile _identityProfile; - /// Identities associated with the cluster. + /// + /// The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned + /// identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesIdentityProfile IdentityProfile { get => (this._identityProfile = this._identityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPropertiesIdentityProfile()); set => this._identityProfile = value; } + /// The resource ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string IdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).IdentityResourceId; } + /// Whether to enable Image Cleaner on AKS cluster. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? ImageCleanerEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).ImageCleanerEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).ImageCleanerEnabled = value ?? default(bool); } @@ -401,6 +537,20 @@ public partial class ManagedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public int? ImageCleanerIntervalHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).ImageCleanerIntervalHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).ImageCleanerIntervalHour = value ?? default(int); } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile _ingressProfile; + + /// Ingress profile for the managed cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile IngressProfile { get => (this._ingressProfile = this._ingressProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfile()); set => this._ingressProfile = value; } + + /// + /// The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary + /// upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List IstioRevision { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).IstioRevision; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).IstioRevision = value ?? null /* arrayOf */; } + /// Whether to enable KEDA. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? KedaEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)WorkloadAutoScalerProfile).KedaEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)WorkloadAutoScalerProfile).KedaEnabled = value ?? default(bool); } @@ -423,12 +573,12 @@ public partial class ManagedClusterProperties : private string _kubernetesVersion; /// - /// Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When - /// is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same - /// once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. - /// When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed - /// sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, - /// however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) + /// The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + /// (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. + /// Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, + /// even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot + /// be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x + /// -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) /// for more details. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] @@ -459,9 +609,19 @@ public partial class ManagedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? MetricEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).MetricEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).MetricEnabled = value ?? default(bool); } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile _metricsProfile; + + /// Optional cluster metrics configuration. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile MetricsProfile { get => (this._metricsProfile = this._metricsProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterMetricsProfile()); set => this._metricsProfile = value; } + /// Internal Acessors for AadProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAadProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.AadProfile { get => (this._aadProfile = this._aadProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAadProfile()); set { {_aadProfile = value;} } } + /// Internal Acessors for AiToolchainOperatorProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.AiToolchainOperatorProfile { get => (this._aiToolchainOperatorProfile = this._aiToolchainOperatorProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAiToolchainOperatorProfile()); set { {_aiToolchainOperatorProfile = value;} } } + /// Internal Acessors for ApiServerAccessProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.ApiServerAccessProfile { get => (this._apiServerAccessProfile = this._apiServerAccessProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterApiServerAccessProfile()); set { {_apiServerAccessProfile = value;} } } @@ -475,16 +635,22 @@ public partial class ManagedClusterProperties : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.AzureMonitorProfile { get => (this._azureMonitorProfile = this._azureMonitorProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfile()); set { {_azureMonitorProfile = value;} } } /// Internal Acessors for AzureMonitorProfileMetric - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.AzureMonitorProfileMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).Metric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).Metric = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.AzureMonitorProfileMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).Metric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).Metric = value ?? null /* model class */; } /// Internal Acessors for AzurePortalFqdn string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.AzurePortalFqdn { get => this._azurePortalFqdn; set { {_azurePortalFqdn = value;} } } + /// Internal Acessors for BootstrapProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.BootstrapProfile { get => (this._bootstrapProfile = this._bootstrapProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterBootstrapProfile()); set { {_bootstrapProfile = value;} } } + + /// Internal Acessors for CertificateAuthorityPlugin + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.CertificateAuthorityPlugin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).CertificateAuthorityPlugin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).CertificateAuthorityPlugin = value ?? null /* model class */; } + /// Internal Acessors for CurrentKubernetesVersion string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.CurrentKubernetesVersion { get => this._currentKubernetesVersion; set { {_currentKubernetesVersion = value;} } } /// Internal Acessors for DefenderSecurityMonitoring - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderSecurityMonitoring Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.DefenderSecurityMonitoring { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).DefenderSecurityMonitoring; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).DefenderSecurityMonitoring = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderSecurityMonitoring Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.DefenderSecurityMonitoring { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).DefenderSecurityMonitoring; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).DefenderSecurityMonitoring = value ?? null /* model class */; } /// Internal Acessors for Fqdn string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.Fqdn { get => this._fqdn; set { {_fqdn = value;} } } @@ -492,23 +658,56 @@ public partial class ManagedClusterProperties : /// Internal Acessors for HttpProxyConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterHttpProxyConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.HttpProxyConfig { get => (this._httpProxyConfig = this._httpProxyConfig ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterHttpProxyConfig()); set { {_httpProxyConfig = value;} } } + /// Internal Acessors for IdentityClientId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.IdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).IdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).IdentityClientId = value ?? null; } + + /// Internal Acessors for IdentityObjectId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.IdentityObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).IdentityObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).IdentityObjectId = value ?? null; } + + /// Internal Acessors for IdentityResourceId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.IdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).IdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).IdentityResourceId = value ?? null; } + + /// Internal Acessors for IngressProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.IngressProfile { get => (this._ingressProfile = this._ingressProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfile()); set { {_ingressProfile = value;} } } + + /// Internal Acessors for IngressProfileWebAppRouting + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.IngressProfileWebAppRouting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).WebAppRouting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).WebAppRouting = value ?? null /* model class */; } + + /// Internal Acessors for IstioCertificateAuthority + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.IstioCertificateAuthority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).IstioCertificateAuthority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).IstioCertificateAuthority = value ?? null /* model class */; } + + /// Internal Acessors for IstioComponent + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.IstioComponent { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).IstioComponent; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).IstioComponent = value ?? null /* model class */; } + /// Internal Acessors for LinuxProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceLinuxProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.LinuxProfile { get => (this._linuxProfile = this._linuxProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceLinuxProfile()); set { {_linuxProfile = value;} } } /// Internal Acessors for LinuxProfileSsh - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceSshConfiguration Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.LinuxProfileSsh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceLinuxProfileInternal)LinuxProfile).Ssh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceLinuxProfileInternal)LinuxProfile).Ssh = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceSshConfiguration Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.LinuxProfileSsh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceLinuxProfileInternal)LinuxProfile).Ssh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceLinuxProfileInternal)LinuxProfile).Ssh = value ?? null /* model class */; } /// Internal Acessors for MaxAgentPool int? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.MaxAgentPool { get => this._maxAgentPool; set { {_maxAgentPool = value;} } } /// Internal Acessors for MetricKubeStateMetric - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileKubeStateMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.MetricKubeStateMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).MetricKubeStateMetric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).MetricKubeStateMetric = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileKubeStateMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.MetricKubeStateMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).MetricKubeStateMetric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).MetricKubeStateMetric = value ?? null /* model class */; } + + /// Internal Acessors for MetricProfileCostAnalysis + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.MetricProfileCostAnalysis { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfileInternal)MetricsProfile).CostAnalysis; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfileInternal)MetricsProfile).CostAnalysis = value ?? null /* model class */; } + + /// Internal Acessors for MetricsProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.MetricsProfile { get => (this._metricsProfile = this._metricsProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterMetricsProfile()); set { {_metricsProfile = value;} } } + + /// Internal Acessors for NodeProvisioningProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.NodeProvisioningProfile { get => (this._nodeProvisioningProfile = this._nodeProvisioningProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeProvisioningProfile()); set { {_nodeProvisioningProfile = value;} } } + + /// Internal Acessors for NodeResourceGroupProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.NodeResourceGroupProfile { get => (this._nodeResourceGroupProfile = this._nodeResourceGroupProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeResourceGroupProfile()); set { {_nodeResourceGroupProfile = value;} } } /// Internal Acessors for OidcIssuerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.OidcIssuerProfile { get => (this._oidcIssuerProfile = this._oidcIssuerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterOidcIssuerProfile()); set { {_oidcIssuerProfile = value;} } } /// Internal Acessors for OidcIssuerProfileIssuerUrl - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfileInternal)OidcIssuerProfile).IssuerUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfileInternal)OidcIssuerProfile).IssuerUrl = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfileInternal)OidcIssuerProfile).IssuerUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfileInternal)OidcIssuerProfile).IssuerUrl = value ?? null; } /// Internal Acessors for PodIdentityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.PodIdentityProfile { get => (this._podIdentityProfile = this._podIdentityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPodIdentityProfile()); set { {_podIdentityProfile = value;} } } @@ -517,49 +716,91 @@ public partial class ManagedClusterProperties : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.PowerState { get => (this._powerState = this._powerState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PowerState()); set { {_powerState = value;} } } /// Internal Acessors for PowerStateCode - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerStateInternal)PowerState).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerStateInternal)PowerState).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerStateInternal)PowerState).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPowerStateInternal)PowerState).Code = value ?? null; } /// Internal Acessors for PrivateFqdn string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.PrivateFqdn { get => this._privateFqdn; set { {_privateFqdn = value;} } } + /// Internal Acessors for ProvisioningErrorAdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.ProvisioningErrorAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorAdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorAdditionalInfo = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningErrorCode + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.ProvisioningErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorCode = value ?? null; } + + /// Internal Acessors for ProvisioningErrorDetail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.ProvisioningErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorDetail = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningErrorMessage + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.ProvisioningErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorMessage = value ?? null; } + + /// Internal Acessors for ProvisioningErrorTarget + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.ProvisioningErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorTarget = value ?? null; } + /// Internal Acessors for ProvisioningState string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + /// Internal Acessors for ResourceUid + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.ResourceUid { get => this._resourceUid; set { {_resourceUid = value;} } } + /// Internal Acessors for SecurityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.SecurityProfile { get => (this._securityProfile = this._securityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfile()); set { {_securityProfile = value;} } } /// Internal Acessors for SecurityProfileAzureKeyVaultKm - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAzureKeyVaultKms Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.SecurityProfileAzureKeyVaultKm { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKm; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKm = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAzureKeyVaultKms Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.SecurityProfileAzureKeyVaultKm { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKm; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKm = value ?? null /* model class */; } /// Internal Acessors for SecurityProfileDefender - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefender Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.SecurityProfileDefender { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).Defender; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).Defender = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefender Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.SecurityProfileDefender { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).Defender; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).Defender = value ?? null /* model class */; } /// Internal Acessors for SecurityProfileImageCleaner - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileImageCleaner Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.SecurityProfileImageCleaner { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).ImageCleaner; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).ImageCleaner = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileImageCleaner Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.SecurityProfileImageCleaner { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).ImageCleaner; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).ImageCleaner = value ?? null /* model class */; } /// Internal Acessors for SecurityProfileWorkloadIdentity - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileWorkloadIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.SecurityProfileWorkloadIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).WorkloadIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).WorkloadIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileWorkloadIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.SecurityProfileWorkloadIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).WorkloadIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).WorkloadIdentity = value ?? null /* model class */; } + + /// Internal Acessors for ServiceMeshProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.ServiceMeshProfile { get => (this._serviceMeshProfile = this._serviceMeshProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ServiceMeshProfile()); set { {_serviceMeshProfile = value;} } } + + /// Internal Acessors for ServiceMeshProfileIstio + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.ServiceMeshProfileIstio { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).Istio; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).Istio = value ?? null /* model class */; } /// Internal Acessors for ServicePrincipalProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterServicePrincipalProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.ServicePrincipalProfile { get => (this._servicePrincipalProfile = this._servicePrincipalProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterServicePrincipalProfile()); set { {_servicePrincipalProfile = value;} } } + /// Internal Acessors for Status + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.Status { get => (this._status = this._status ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStatus()); set { {_status = value;} } } + + /// Internal Acessors for StatusProvisioningError + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.StatusProvisioningError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningError; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningError = value ?? null /* model class */; } + /// Internal Acessors for StorageProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfile()); set { {_storageProfile = value;} } } /// Internal Acessors for StorageProfileBlobCsiDriver - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileBlobCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.StorageProfileBlobCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).BlobCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).BlobCsiDriver = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileBlobCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.StorageProfileBlobCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).BlobCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).BlobCsiDriver = value ?? null /* model class */; } /// Internal Acessors for StorageProfileDiskCsiDriver - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileDiskCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.StorageProfileDiskCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).DiskCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).DiskCsiDriver = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileDiskCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.StorageProfileDiskCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).DiskCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).DiskCsiDriver = value ?? null /* model class */; } /// Internal Acessors for StorageProfileFileCsiDriver - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileFileCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.StorageProfileFileCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).FileCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).FileCsiDriver = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileFileCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.StorageProfileFileCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).FileCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).FileCsiDriver = value ?? null /* model class */; } /// Internal Acessors for StorageProfileSnapshotController - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileSnapshotController Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.StorageProfileSnapshotController { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).SnapshotController; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).SnapshotController = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileSnapshotController Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.StorageProfileSnapshotController { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).SnapshotController; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileInternal)StorageProfile).SnapshotController = value ?? null /* model class */; } + + /// Internal Acessors for UpgradeSetting + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.UpgradeSetting { get => (this._upgradeSetting = this._upgradeSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ClusterUpgradeSettings()); set { {_upgradeSetting = value;} } } + + /// Internal Acessors for UpgradeSettingOverrideSetting + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.UpgradeSettingOverrideSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)UpgradeSetting).OverrideSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)UpgradeSetting).OverrideSetting = value ?? null /* model class */; } + + /// Internal Acessors for WebAppRoutingIdentity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.WebAppRoutingIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).WebAppRoutingIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).WebAppRoutingIdentity = value ?? null /* model class */; } + + /// Internal Acessors for WebAppRoutingNginx + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.WebAppRoutingNginx { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).WebAppRoutingNginx; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).WebAppRoutingNginx = value ?? null /* model class */; } /// Internal Acessors for WindowProfileGmsaProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWindowsGmsaProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.WindowProfileGmsaProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWindowsGmsaProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.WindowProfileGmsaProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfile = value ?? null /* model class */; } /// Internal Acessors for WindowsProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.WindowsProfile { get => (this._windowsProfile = this._windowsProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWindowsProfile()); set { {_windowsProfile = value;} } } @@ -568,7 +809,10 @@ public partial class ManagedClusterProperties : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.WorkloadAutoScalerProfile { get => (this._workloadAutoScalerProfile = this._workloadAutoScalerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfile()); set { {_workloadAutoScalerProfile = value;} } } /// Internal Acessors for WorkloadAutoScalerProfileKeda - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileKeda Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.WorkloadAutoScalerProfileKeda { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)WorkloadAutoScalerProfile).Keda; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)WorkloadAutoScalerProfile).Keda = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileKeda Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.WorkloadAutoScalerProfileKeda { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)WorkloadAutoScalerProfile).Keda; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)WorkloadAutoScalerProfile).Keda = value ?? null /* model class */; } + + /// Internal Acessors for WorkloadAutoScalerProfileVerticalPodAutoscaler + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesInternal.WorkloadAutoScalerProfileVerticalPodAutoscaler { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)WorkloadAutoScalerProfile).VerticalPodAutoscaler; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)WorkloadAutoScalerProfile).VerticalPodAutoscaler = value ?? null /* model class */; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfile _networkProfile; @@ -577,6 +821,31 @@ public partial class ManagedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfile NetworkProfile { get => (this._networkProfile = this._networkProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceNetworkProfile()); set => this._networkProfile = value; } + /// Ingress type for the default NginxIngressController custom resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string NginxDefaultIngressControllerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).NginxDefaultIngressControllerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).NginxDefaultIngressControllerType = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile _nodeProvisioningProfile; + + /// Node provisioning settings that apply to the whole cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile NodeProvisioningProfile { get => (this._nodeProvisioningProfile = this._nodeProvisioningProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeProvisioningProfile()); set => this._nodeProvisioningProfile = value; } + + /// + /// The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless mode is + /// 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to + /// be deleted, which will drain and delete the nodes associated with those pools. It is strongly recommended to not do this + /// unless there are idle nodes ready to take the pods evicted by that action. If not specified, the default is Auto. For + /// more information see aka.ms/aks/nap#node-pools. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string NodeProvisioningProfileDefaultNodePool { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfileInternal)NodeProvisioningProfile).DefaultNodePool; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfileInternal)NodeProvisioningProfile).DefaultNodePool = value ?? null; } + + /// The node provisioning mode. If not specified, the default is Manual. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string NodeProvisioningProfileMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfileInternal)NodeProvisioningProfile).Mode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfileInternal)NodeProvisioningProfile).Mode = value ?? null; } + /// Backing field for property. private string _nodeResourceGroup; @@ -584,6 +853,19 @@ public partial class ManagedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string NodeResourceGroup { get => this._nodeResourceGroup; set => this._nodeResourceGroup = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile _nodeResourceGroupProfile; + + /// Profile of the node resource group configuration. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile NodeResourceGroupProfile { get => (this._nodeResourceGroupProfile = this._nodeResourceGroupProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeResourceGroupProfile()); set => this._nodeResourceGroupProfile = value; } + + /// + /// The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string NodeResourceGroupProfileRestrictionLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfileInternal)NodeResourceGroupProfile).RestrictionLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfileInternal)NodeResourceGroupProfile).RestrictionLevel = value ?? null; } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfile _oidcIssuerProfile; @@ -599,19 +881,55 @@ public partial class ManagedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfileInternal)OidcIssuerProfile).IssuerUrl; } + /// + /// Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections + /// such as checking for deprecated API usage. Enable this option only with caution. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? OverrideSettingForceUpgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)UpgradeSetting).OverrideSettingForceUpgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)UpgradeSetting).OverrideSettingForceUpgrade = value ?? default(bool); } + + /// + /// Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness + /// won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. + /// It must be set for the overrides to take effect. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public global::System.DateTime? OverrideSettingUntil { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)UpgradeSetting).OverrideSettingUntil; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettingsInternal)UpgradeSetting).OverrideSettingUntil = value ?? default(global::System.DateTime); } + + /// Certificate chain object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginCertChainObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).PluginCertChainObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).PluginCertChainObjectName = value ?? null; } + + /// Intermediate certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginCertObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).PluginCertObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).PluginCertObjectName = value ?? null; } + + /// Intermediate certificate private key object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginKeyObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).PluginKeyObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).PluginKeyObjectName = value ?? null; } + + /// The resource ID of the Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginKeyVaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).PluginKeyVaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).PluginKeyVaultId = value ?? null; } + + /// Root certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginRootCertObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).PluginRootCertObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).PluginRootCertObjectName = value ?? null; } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProfile _podIdentityProfile; /// - /// See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod - /// identity integration. + /// The pod identity profile of the Managed Cluster. See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on AAD pod identity integration. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProfile PodIdentityProfile { get => (this._podIdentityProfile = this._podIdentityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPodIdentityProfile()); set => this._podIdentityProfile = value; } /// - /// Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. - /// See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + /// Whether pod identity is allowed to run on clusters with Kubenet networking. Running in Kubenet is disabled by default + /// due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin + /// with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) /// for more information. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] @@ -654,6 +972,26 @@ public partial class ManagedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public System.Collections.Generic.List PrivateLinkResource { get => this._privateLinkResource; set => this._privateLinkResource = value; } + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorAdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorCode; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ProvisioningErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorDetail; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorMessage; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)Status).ProvisioningErrorTarget; } + /// Backing field for property. private string _provisioningState; @@ -664,10 +1002,21 @@ public partial class ManagedClusterProperties : /// Backing field for property. private string _publicNetworkAccess; - /// Allow or deny public network access for AKS + /// + /// PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string PublicNetworkAccess { get => this._publicNetworkAccess; set => this._publicNetworkAccess = value; } + /// Backing field for property. + private string _resourceUid; + + /// + /// The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create sequence) + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ResourceUid { get => this._resourceUid; } + /// Whether to enable Defender threat detection [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? SecurityMonitoringEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).SecurityMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).SecurityMonitoringEnabled = value ?? default(bool); } @@ -679,6 +1028,24 @@ public partial class ManagedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfile SecurityProfile { get => (this._securityProfile = this._securityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfile()); set => this._securityProfile = value; } + /// + /// A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information + /// see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List SecurityProfileCustomCaTrustCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).CustomCaTrustCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)SecurityProfile).CustomCaTrustCertificate = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile _serviceMeshProfile; + + /// Service mesh profile for a managed cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile ServiceMeshProfile { get => (this._serviceMeshProfile = this._serviceMeshProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ServiceMeshProfile()); set => this._serviceMeshProfile = value; } + + /// Mode of the service mesh. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ServiceMeshProfileMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).Mode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)ServiceMeshProfile).Mode = value ?? null; } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterServicePrincipalProfile _servicePrincipalProfile; @@ -706,6 +1073,13 @@ public partial class ManagedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public System.Collections.Generic.List SshPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceLinuxProfileInternal)LinuxProfile).SshPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceLinuxProfileInternal)LinuxProfile).SshPublicKey = value ?? null /* arrayOf */; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus _status; + + /// Contains read-only information about the Managed Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus Status { get => (this._status = this._status ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStatus()); set => this._status = value; } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfile _storageProfile; @@ -713,6 +1087,38 @@ public partial class ManagedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfile StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfile()); set => this._storageProfile = value; } + /// Backing field for property. + private string _supportPlan; + + /// + /// The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string SupportPlan { get => this._supportPlan; set => this._supportPlan = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings _upgradeSetting; + + /// Settings for upgrading a cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings UpgradeSetting { get => (this._upgradeSetting = this._upgradeSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ClusterUpgradeSettings()); set => this._upgradeSetting = value; } + + /// Whether to enable VPA. Default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? VerticalPodAutoscalerEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)WorkloadAutoScalerProfile).VerticalPodAutoscalerEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)WorkloadAutoScalerProfile).VerticalPodAutoscalerEnabled = value ?? default(bool); } + + /// + /// Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing + /// add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be + /// in the same resource group and all private DNS zones must be in the same resource group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List WebAppRoutingDnsZoneResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).WebAppRoutingDnsZoneResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).WebAppRoutingDnsZoneResourceId = value ?? null /* arrayOf */; } + + /// Whether to enable the Application Routing add-on. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? WebAppRoutingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).WebAppRoutingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileInternal)IngressProfile).WebAppRoutingEnabled = value ?? default(bool); } + /// /// Specifies the password of the administrator account.

**Minimum-length:** 8 characters

**Max-length:** /// 123 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters @@ -732,7 +1138,7 @@ public partial class ManagedClusterProperties : public string WindowProfileAdminUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfileInternal)WindowsProfile).AdminUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfileInternal)WindowsProfile).AdminUsername = value ?? null; } /// - /// For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). + /// Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? WindowProfileEnableCsiProxy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfileInternal)WindowsProfile).EnableCsiProxy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWindowsProfileInternal)WindowsProfile).EnableCsiProxy = value ?? default(bool); } @@ -880,9 +1286,22 @@ public partial interface IManagedClusterProperties : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAgentPoolProfile) })] System.Collections.Generic.List AgentPoolProfile { get; set; } /// - /// IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use - /// Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized - /// IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + /// Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain operator enabled or not. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain operator enabled or not.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? AiToolchainOperatorProfileEnabled { get; set; } + /// + /// The IP ranges authorized to access the Kubernetes API server. IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + /// This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. + /// For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -890,7 +1309,7 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges).", + Description = @"The IP ranges authorized to access the Kubernetes API server. IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges).", SerializedName = @"authorizedIPRanges", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List ApiServerAccessProfileAuthorizedIPRange { get; set; } @@ -906,7 +1325,7 @@ public partial interface IManagedClusterProperties : PossibleTypes = new [] { typeof(bool) })] bool? ApiServerAccessProfileDisableRunCommand { get; set; } /// - /// For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). + /// Whether to create the cluster as a private cluster or not. For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -914,7 +1333,7 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters).", + Description = @"Whether to create the cluster as a private cluster or not. For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters).", SerializedName = @"enablePrivateCluster", PossibleTypes = new [] { typeof(bool) })] bool? ApiServerAccessProfileEnablePrivateCluster { get; set; } @@ -930,7 +1349,20 @@ public partial interface IManagedClusterProperties : PossibleTypes = new [] { typeof(bool) })] bool? ApiServerAccessProfileEnablePrivateClusterPublicFqdn { get; set; } /// - /// The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). + /// Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more details.", + SerializedName = @"enableVnetIntegration", + PossibleTypes = new [] { typeof(bool) })] + bool? ApiServerAccessProfileEnableVnetIntegration { get; set; } + /// + /// The private DNS zone mode for the cluster. The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). /// Allowed values are 'system' and 'none'. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -939,24 +1371,26 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are 'system' and 'none'.", + Description = @"The private DNS zone mode for the cluster. The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are 'system' and 'none'.", SerializedName = @"privateDNSZone", PossibleTypes = new [] { typeof(string) })] string ApiServerAccessProfilePrivateDnsZone { get; set; } - /// Valid values are 'true' and 'false' + /// + /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with BYO + /// Vnet, or when updating an existing cluster to enable apiserver vnet integration. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Valid values are 'true' and 'false'", - SerializedName = @"balance-similar-node-groups", + Description = @"The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration.", + SerializedName = @"subnetId", PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileBalanceSimilarNodeGroup { get; set; } + string ApiServerAccessProfileSubnetId { get; set; } /// - /// If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) - /// for more information. + /// Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false' /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -964,35 +1398,43 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for more information.", - SerializedName = @"expander", + Description = @"Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false'", + SerializedName = @"balance-similar-node-groups", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("least-waste", "most-pods", "priority", "random")] - string AutoScalerProfileExpander { get; set; } - /// The default is 10. + string AutoScalerProfileBalanceSimilarNodeGroup { get; set; } + /// + /// DaemonSet pods will be gracefully terminated from empty nodes. If set to true, all daemonset pods on empty nodes will + /// be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is 10.", - SerializedName = @"max-empty-bulk-delete", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileMaxEmptyBulkDelete { get; set; } - /// The default is 600. + Description = @"DaemonSet pods will be gracefully terminated from empty nodes. If set to true, all daemonset pods on empty nodes will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted.", + SerializedName = @"daemonset-eviction-for-empty-nodes", + PossibleTypes = new [] { typeof(bool) })] + bool? AutoScalerProfileDaemonsetEvictionForEmptyNode { get; set; } + /// + /// DaemonSet pods will be gracefully terminated from non-empty nodes. If set to true, all daemonset pods on occupied nodes + /// will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is 600.", - SerializedName = @"max-graceful-termination-sec", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileMaxGracefulTerminationSec { get; set; } + Description = @"DaemonSet pods will be gracefully terminated from non-empty nodes. If set to true, all daemonset pods on occupied nodes will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted.", + SerializedName = @"daemonset-eviction-for-occupied-nodes", + PossibleTypes = new [] { typeof(bool) })] + bool? AutoScalerProfileDaemonsetEvictionForOccupiedNode { get; set; } /// - /// The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// The expander to use when scaling up. If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + /// for more information. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1000,25 +1442,28 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", - SerializedName = @"max-node-provision-time", + Description = @"The expander to use when scaling up. If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for more information.", + SerializedName = @"expander", PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileMaxNodeProvisionTime { get; set; } - /// The default is 45. The maximum is 100 and the minimum is 0. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("least-waste", "most-pods", "priority", "random")] + string AutoScalerProfileExpander { get; set; } + /// + /// Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the resources + /// used by daemonset will be taken into account when making scaling down decisions. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is 45. The maximum is 100 and the minimum is 0.", - SerializedName = @"max-total-unready-percentage", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileMaxTotalUnreadyPercentage { get; set; } + Description = @"Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the resources used by daemonset will be taken into account when making scaling down decisions.", + SerializedName = @"ignore-daemonsets-utilization", + PossibleTypes = new [] { typeof(bool) })] + bool? AutoScalerProfileIgnoreDaemonsetsUtilization { get; set; } /// - /// For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all - /// the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be - /// an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + /// The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is + /// 10. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1026,23 +1471,85 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc).", + Description = @"The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is 10.", + SerializedName = @"max-empty-bulk-delete", + PossibleTypes = new [] { typeof(string) })] + string AutoScalerProfileMaxEmptyBulkDelete { get; set; } + /// + /// The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. The default + /// is 600. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. The default is 600.", + SerializedName = @"max-graceful-termination-sec", + PossibleTypes = new [] { typeof(string) })] + string AutoScalerProfileMaxGracefulTerminationSec { get; set; } + /// + /// The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + SerializedName = @"max-node-provision-time", + PossibleTypes = new [] { typeof(string) })] + string AutoScalerProfileMaxNodeProvisionTime { get; set; } + /// + /// The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler halts operations. + /// The default is 45. The maximum is 100 and the minimum is 0. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler halts operations. The default is 45. The maximum is 100 and the minimum is 0.", + SerializedName = @"max-total-unready-percentage", + PossibleTypes = new [] { typeof(string) })] + string AutoScalerProfileMaxTotalUnreadyPercentage { get; set; } + /// + /// Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want CA to + /// act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're + /// a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' + /// for hours, etc). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc).", SerializedName = @"new-pod-scale-up-delay", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileNewPodScaleUpDelay { get; set; } - /// This must be an integer. The default is 3. + /// + /// The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default + /// is 3. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"This must be an integer. The default is 3.", + Description = @"The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default is 3.", SerializedName = @"ok-total-unready-count", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileOkTotalUnreadyCount { get; set; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer followed by + /// an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1050,13 +1557,13 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-delay-after-add", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileScaleDownDelayAfterAdd { get; set; } /// - /// The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) - /// is supported. + /// How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1064,12 +1571,13 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-delay-after-delete", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileScaleDownDelayAfterDelete { get; set; } /// - /// The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1077,12 +1585,13 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-delay-after-failure", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileScaleDownDelayAfterFailure { get; set; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1090,12 +1599,13 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-unneeded-time", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileScaleDownUnneededTime { get; set; } /// - /// The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long an unready node should be unneeded before it is eligible for scale down. The default is '20m'. Values must be + /// an integer followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1103,56 +1613,82 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long an unready node should be unneeded before it is eligible for scale down. The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-unready-time", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileScaleDownUnreadyTime { get; set; } - /// The default is '0.5'. + /// + /// Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered + /// for scale down. The default is '0.5'. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is '0.5'.", + Description = @"Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down. The default is '0.5'.", SerializedName = @"scale-down-utilization-threshold", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileScaleDownUtilizationThreshold { get; set; } - /// The default is '10'. Values must be an integer number of seconds. + /// + /// How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is '10'. Values must be an integer number of seconds.", + Description = @"How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds.", SerializedName = @"scan-interval", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileScanInterval { get; set; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. The default + /// is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is true.", + Description = @"If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. The default is true.", SerializedName = @"skip-nodes-with-local-storage", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileSkipNodesWithLocalStorage { get; set; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods). The default + /// is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is true.", + Description = @"If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods). The default is true.", SerializedName = @"skip-nodes-with-system-pods", PossibleTypes = new [] { typeof(string) })] string AutoScalerProfileSkipNodesWithSystemPod { get; set; } /// - /// For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + /// Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage.", + SerializedName = @"nodeOSUpgradeChannel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("None", "Unmanaged", "NodeImage", "SecurityPatch")] + string AutoUpgradeProfileNodeOSUpgradeChannel { get; set; } + /// + /// The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster auto-upgrade + /// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1160,7 +1696,7 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel).", + Description = @"The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel).", SerializedName = @"upgradeChannel", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("rapid", "stable", "patch", "node-image", "none")] @@ -1192,9 +1728,9 @@ public partial interface IManagedClusterProperties : PossibleTypes = new [] { typeof(string) })] string AzureKeyVaultKmKeyId { get; set; } /// - /// Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public - /// access from all networks. `Private` means the key vault disables public access and enables private link. The default value - /// is `Public`. + /// Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` + /// means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables + /// private link. The default value is `Public`. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1202,7 +1738,7 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables private link. The default value is `Public`.", + Description = @"Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables private link. The default value is `Public`.", SerializedName = @"keyVaultNetworkAccess", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Public", "Private")] @@ -1222,8 +1758,10 @@ public partial interface IManagedClusterProperties : PossibleTypes = new [] { typeof(string) })] string AzureKeyVaultKmKeyVaultResourceId { get; set; } /// - /// 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. + /// 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. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1231,7 +1769,7 @@ public partial interface IManagedClusterProperties : Read = true, Create = false, Update = false, - Description = @"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.", + Description = @"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.", SerializedName = @"azurePortalFQDN", PossibleTypes = new [] { typeof(string) })] string AzurePortalFqdn { get; } @@ -1246,9 +1784,72 @@ public partial interface IManagedClusterProperties : SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] bool? BlobCsiDriverEnabled { get; set; } + /// The artifact source. The source where the artifacts are downloaded from. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The artifact source. The source where the artifacts are downloaded from.", + SerializedName = @"artifactSource", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Cache", "Direct")] + string BootstrapProfileArtifactSource { get; set; } + /// + /// The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy.", + SerializedName = @"containerRegistryId", + PossibleTypes = new [] { typeof(string) })] + string BootstrapProfileContainerRegistryId { get; set; } + /// Istio egress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Istio egress gateways.", + SerializedName = @"egressGateways", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway) })] + System.Collections.Generic.List ComponentEgressGateway { get; set; } + /// Istio ingress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Istio ingress gateways.", + SerializedName = @"ingressGateways", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway) })] + System.Collections.Generic.List ComponentIngressGateway { get; set; } + /// + /// Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. + /// Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If + /// not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? CostAnalysisEnabled { get; set; } /// - /// If kubernetesVersion was a fully specified version , this field will be exactly equal to it. If kubernetesVersion - /// was , this field will contain the full version being used. + /// The version of Kubernetes the Managed Cluster is running. If kubernetesVersion was a fully specified version , + /// this field will be exactly equal to it. If kubernetesVersion was , this field will contain the full + /// version being used. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1256,7 +1857,7 @@ public partial interface IManagedClusterProperties : Read = true, Create = false, Update = false, - Description = @"If kubernetesVersion was a fully specified version , this field will be exactly equal to it. If kubernetesVersion was , this field will contain the full version being used.", + Description = @"The version of Kubernetes the Managed Cluster is running. If kubernetesVersion was a fully specified version , this field will be exactly equal to it. If kubernetesVersion was , this field will contain the full version being used.", SerializedName = @"currentKubernetesVersion", PossibleTypes = new [] { typeof(string) })] string CurrentKubernetesVersion { get; } @@ -1276,8 +1877,9 @@ public partial interface IManagedClusterProperties : PossibleTypes = new [] { typeof(string) })] string DefenderLogAnalyticsWorkspaceResourceId { get; set; } /// - /// If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters - /// that are AAD enabled. For more details see [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + /// If local accounts should be disabled on the Managed Cluster. If set to true, getting static credentials will be disabled + /// for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see [disable local + /// accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1285,7 +1887,7 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview).", + Description = @"If local accounts should be disabled on the Managed Cluster. If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview).", SerializedName = @"disableLocalAccounts", PossibleTypes = new [] { typeof(bool) })] bool? DisableLocalAccount { get; set; } @@ -1301,7 +1903,7 @@ public partial interface IManagedClusterProperties : PossibleTypes = new [] { typeof(bool) })] bool? DiskCsiDriverEnabled { get; set; } /// - /// This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' + /// The Resource ID of the disk encryption set to use for enabling encryption at rest. This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1309,35 +1911,23 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'", + Description = @"The Resource ID of the disk encryption set to use for enabling encryption at rest. This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'", SerializedName = @"diskEncryptionSetID", PossibleTypes = new [] { typeof(string) })] string DiskEncryptionSetId { get; set; } - /// This cannot be updated once the Managed Cluster has been created. + /// + /// The DNS prefix of the Managed Cluster. This cannot be updated once the Managed Cluster has been created. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"This cannot be updated once the Managed Cluster has been created.", + Description = @"The DNS prefix of the Managed Cluster. This cannot be updated once the Managed Cluster has been created.", SerializedName = @"dnsPrefix", PossibleTypes = new [] { typeof(string) })] string DnsPrefix { get; set; } - /// - /// (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes - /// v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"(DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp.", - SerializedName = @"enablePodSecurityPolicy", - PossibleTypes = new [] { typeof(bool) })] - bool? EnablePodSecurityPolicy { get; set; } /// Whether to enable Kubernetes Role-Based Access Control. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1371,14 +1961,17 @@ public partial interface IManagedClusterProperties : SerializedName = @"fqdn", PossibleTypes = new [] { typeof(string) })] string Fqdn { get; } - /// This cannot be updated once the Managed Cluster has been created. + /// + /// The FQDN subdomain of the private cluster with custom private dns zone. This cannot be updated once the Managed Cluster + /// has been created. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"This cannot be updated once the Managed Cluster has been created.", + Description = @"The FQDN subdomain of the private cluster with custom private dns zone. This cannot be updated once the Managed Cluster has been created.", SerializedName = @"fqdnSubdomain", PossibleTypes = new [] { typeof(string) })] string FqdnSubdomain { get; set; } @@ -1396,14 +1989,16 @@ public partial interface IManagedClusterProperties : SerializedName = @"dnsServer", PossibleTypes = new [] { typeof(string) })] string GmsaProfileDnsServer { get; set; } - /// Specifies whether to enable Windows gMSA in the managed cluster. + /// + /// Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Specifies whether to enable Windows gMSA in the managed cluster.", + Description = @"Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster.", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] bool? GmsaProfileEnabled { get; set; } @@ -1465,17 +2060,53 @@ public partial interface IManagedClusterProperties : SerializedName = @"trustedCa", PossibleTypes = new [] { typeof(string) })] string HttpProxyConfigTrustedCa { get; set; } - /// Identities associated with the cluster. + /// The client ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The client ID of the user assigned identity.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string IdentityClientId { get; } + /// The object ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The object ID of the user assigned identity.", + SerializedName = @"objectId", + PossibleTypes = new [] { typeof(string) })] + string IdentityObjectId { get; } + /// + /// The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned + /// identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Identities associated with the cluster.", + Description = @"The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned identity is allowed. The only accepted key is ""kubeletidentity"", with value of ""resourceId"": ""/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}"".", SerializedName = @"identityProfile", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesIdentityProfile) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesIdentityProfile IdentityProfile { get; set; } + /// The resource ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The resource ID of the user assigned identity.", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + string IdentityResourceId { get; } /// Whether to enable Image Cleaner on AKS cluster. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1498,6 +2129,20 @@ public partial interface IManagedClusterProperties : SerializedName = @"intervalHours", PossibleTypes = new [] { typeof(int) })] int? ImageCleanerIntervalHour { get; set; } + /// + /// The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary + /// upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade", + SerializedName = @"revisions", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List IstioRevision { get; set; } /// Whether to enable KEDA. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1538,12 +2183,12 @@ public partial interface IManagedClusterProperties : PossibleTypes = new [] { typeof(string) })] string KubeStateMetricLabelsAllowlist { get; set; } /// - /// Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When - /// is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same - /// once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. - /// When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed - /// sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, - /// however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) + /// The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + /// (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. + /// Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, + /// even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot + /// be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x + /// -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) /// for more details. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -1552,7 +2197,7 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details.", + Description = @"The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details.", SerializedName = @"kubernetesVersion", PossibleTypes = new [] { typeof(string) })] string KubernetesVersion { get; set; } @@ -1603,6 +2248,48 @@ public partial interface IManagedClusterProperties : SerializedName = @"networkProfile", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfile) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfile NetworkProfile { get; set; } + /// Ingress type for the default NginxIngressController custom resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Ingress type for the default NginxIngressController custom resource", + SerializedName = @"defaultIngressControllerType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("AnnotationControlled", "External", "Internal", "None")] + string NginxDefaultIngressControllerType { get; set; } + /// + /// The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless mode is + /// 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to + /// be deleted, which will drain and delete the nodes associated with those pools. It is strongly recommended to not do this + /// unless there are idle nodes ready to take the pods evicted by that action. If not specified, the default is Auto. For + /// more information see aka.ms/aks/nap#node-pools. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless mode is 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to be deleted, which will drain and delete the nodes associated with those pools. It is strongly recommended to not do this unless there are idle nodes ready to take the pods evicted by that action. If not specified, the default is Auto. For more information see aka.ms/aks/nap#node-pools.", + SerializedName = @"defaultNodePools", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("None", "Auto")] + string NodeProvisioningProfileDefaultNodePool { get; set; } + /// The node provisioning mode. If not specified, the default is Manual. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The node provisioning mode. If not specified, the default is Manual.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Manual", "Auto")] + string NodeProvisioningProfileMode { get; set; } /// The name of the resource group containing agent pool nodes. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1614,6 +2301,20 @@ public partial interface IManagedClusterProperties : SerializedName = @"nodeResourceGroup", PossibleTypes = new [] { typeof(string) })] string NodeResourceGroup { get; set; } + /// + /// The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted'", + SerializedName = @"restrictionLevel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Unrestricted", "ReadOnly")] + string NodeResourceGroupProfileRestrictionLevel { get; set; } /// Whether the OIDC issuer is enabled. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1637,8 +2338,93 @@ public partial interface IManagedClusterProperties : PossibleTypes = new [] { typeof(string) })] string OidcIssuerProfileIssuerUrl { get; } /// - /// Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. - /// See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + /// Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections + /// such as checking for deprecated API usage. Enable this option only with caution. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections such as checking for deprecated API usage. Enable this option only with caution.", + SerializedName = @"forceUpgrade", + PossibleTypes = new [] { typeof(bool) })] + bool? OverrideSettingForceUpgrade { get; set; } + /// + /// Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness + /// won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. + /// It must be set for the overrides to take effect. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. It must be set for the overrides to take effect.", + SerializedName = @"until", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OverrideSettingUntil { get; set; } + /// Certificate chain object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Certificate chain object name in Azure Key Vault.", + SerializedName = @"certChainObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginCertChainObjectName { get; set; } + /// Intermediate certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Intermediate certificate object name in Azure Key Vault.", + SerializedName = @"certObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginCertObjectName { get; set; } + /// Intermediate certificate private key object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Intermediate certificate private key object name in Azure Key Vault.", + SerializedName = @"keyObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginKeyObjectName { get; set; } + /// The resource ID of the Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The resource ID of the Key Vault.", + SerializedName = @"keyVaultId", + PossibleTypes = new [] { typeof(string) })] + string PluginKeyVaultId { get; set; } + /// Root certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Root certificate object name in Azure Key Vault.", + SerializedName = @"rootCertObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginRootCertObjectName { get; set; } + /// + /// Whether pod identity is allowed to run on clusters with Kubenet networking. Running in Kubenet is disabled by default + /// due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin + /// with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) /// for more information. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -1647,7 +2433,7 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) for more information.", + Description = @"Whether pod identity is allowed to run on clusters with Kubenet networking. Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) for more information.", SerializedName = @"allowNetworkPluginKubenet", PossibleTypes = new [] { typeof(bool) })] bool? PodIdentityProfileAllowNetworkPluginKubenet { get; set; } @@ -1718,6 +2504,61 @@ public partial interface IManagedClusterProperties : SerializedName = @"privateLinkResources", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkResource) })] System.Collections.Generic.List PrivateLinkResource { get; set; } + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorCode { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) })] + System.Collections.Generic.List ProvisioningErrorDetail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorMessage { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorTarget { get; } /// The current provisioning state. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1729,18 +2570,33 @@ public partial interface IManagedClusterProperties : SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] string ProvisioningState { get; } - /// Allow or deny public network access for AKS + /// + /// PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Allow or deny public network access for AKS", + Description = @"PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS", SerializedName = @"publicNetworkAccess", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Enabled", "Disabled")] string PublicNetworkAccess { get; set; } + /// + /// The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create sequence) + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create sequence)", + SerializedName = @"resourceUID", + PossibleTypes = new [] { typeof(string) })] + string ResourceUid { get; } /// Whether to enable Defender threat detection [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1752,6 +2608,32 @@ public partial interface IManagedClusterProperties : SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] bool? SecurityMonitoringEnabled { get; set; } + /// + /// A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information + /// see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority).", + SerializedName = @"customCATrustCertificates", + PossibleTypes = new [] { typeof(byte[]) })] + System.Collections.Generic.List SecurityProfileCustomCaTrustCertificate { get; set; } + /// Mode of the service mesh. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Mode of the service mesh.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Istio", "Disabled")] + string ServiceMeshProfileMode { get; set; } /// The ID for the service principal. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1799,6 +2681,57 @@ public partial interface IManagedClusterProperties : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceSshPublicKey) })] System.Collections.Generic.List SshPublicKey { get; set; } /// + /// The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'.", + SerializedName = @"supportPlan", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("KubernetesOfficial", "AKSLongTermSupport")] + string SupportPlan { get; set; } + /// Whether to enable VPA. Default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable VPA. Default value is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? VerticalPodAutoscalerEnabled { get; set; } + /// + /// Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing + /// add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be + /// in the same resource group and all private DNS zones must be in the same resource group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in the same resource group.", + SerializedName = @"dnsZoneResourceIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List WebAppRoutingDnsZoneResourceId { get; set; } + /// Whether to enable the Application Routing add-on. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable the Application Routing add-on.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? WebAppRoutingEnabled { get; set; } + /// /// Specifies the password of the administrator account.

**Minimum-length:** 8 characters

**Max-length:** /// 123 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters ///
Has upper characters
Has a digit
Has a special character (Regex match [\W_])

**Disallowed values:** @@ -1831,7 +2764,7 @@ public partial interface IManagedClusterProperties : PossibleTypes = new [] { typeof(string) })] string WindowProfileAdminUsername { get; set; } /// - /// For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). + /// Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -1839,7 +2772,7 @@ public partial interface IManagedClusterProperties : Read = true, Create = true, Update = true, - Description = @"For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy).", + Description = @"Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy).", SerializedName = @"enableCSIProxy", PossibleTypes = new [] { typeof(bool) })] bool? WindowProfileEnableCsiProxy { get; set; } @@ -1903,88 +2836,157 @@ internal partial interface IManagedClusterPropertiesInternal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAddonProfiles AddonProfile { get; set; } /// The agent pool properties. System.Collections.Generic.List AgentPoolProfile { get; set; } + /// AI toolchain operator settings that apply to the whole cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAiToolchainOperatorProfile AiToolchainOperatorProfile { get; set; } + /// + /// Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain operator enabled or not. + /// + bool? AiToolchainOperatorProfileEnabled { get; set; } /// The access profile for managed cluster API server. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterApiServerAccessProfile ApiServerAccessProfile { get; set; } /// - /// IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use - /// Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized - /// IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + /// The IP ranges authorized to access the Kubernetes API server. IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + /// This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. + /// For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). /// System.Collections.Generic.List ApiServerAccessProfileAuthorizedIPRange { get; set; } /// Whether to disable run command for the cluster or not. bool? ApiServerAccessProfileDisableRunCommand { get; set; } /// - /// For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). + /// Whether to create the cluster as a private cluster or not. For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). /// bool? ApiServerAccessProfileEnablePrivateCluster { get; set; } /// Whether to create additional public FQDN for private cluster or not. bool? ApiServerAccessProfileEnablePrivateClusterPublicFqdn { get; set; } /// - /// The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). + /// Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more details. + /// + bool? ApiServerAccessProfileEnableVnetIntegration { get; set; } + /// + /// The private DNS zone mode for the cluster. The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). /// Allowed values are 'system' and 'none'. /// string ApiServerAccessProfilePrivateDnsZone { get; set; } + /// + /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with BYO + /// Vnet, or when updating an existing cluster to enable apiserver vnet integration. + /// + string ApiServerAccessProfileSubnetId { get; set; } /// Parameters to be applied to the cluster-autoscaler when enabled Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfile AutoScalerProfile { get; set; } - /// Valid values are 'true' and 'false' + /// + /// Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false' + /// string AutoScalerProfileBalanceSimilarNodeGroup { get; set; } /// - /// If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + /// DaemonSet pods will be gracefully terminated from empty nodes. If set to true, all daemonset pods on empty nodes will + /// be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + bool? AutoScalerProfileDaemonsetEvictionForEmptyNode { get; set; } + /// + /// DaemonSet pods will be gracefully terminated from non-empty nodes. If set to true, all daemonset pods on occupied nodes + /// will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + bool? AutoScalerProfileDaemonsetEvictionForOccupiedNode { get; set; } + /// + /// The expander to use when scaling up. If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) /// for more information. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("least-waste", "most-pods", "priority", "random")] string AutoScalerProfileExpander { get; set; } - /// The default is 10. + /// + /// Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the resources + /// used by daemonset will be taken into account when making scaling down decisions. + /// + bool? AutoScalerProfileIgnoreDaemonsetsUtilization { get; set; } + /// + /// The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is + /// 10. + /// string AutoScalerProfileMaxEmptyBulkDelete { get; set; } - /// The default is 600. + /// + /// The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. The default + /// is 600. + /// string AutoScalerProfileMaxGracefulTerminationSec { get; set; } /// - /// The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// string AutoScalerProfileMaxNodeProvisionTime { get; set; } - /// The default is 45. The maximum is 100 and the minimum is 0. + /// + /// The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler halts operations. + /// The default is 45. The maximum is 100 and the minimum is 0. + /// string AutoScalerProfileMaxTotalUnreadyPercentage { get; set; } /// - /// For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all - /// the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be - /// an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + /// Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want CA to + /// act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're + /// a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' + /// for hours, etc). /// string AutoScalerProfileNewPodScaleUpDelay { get; set; } - /// This must be an integer. The default is 3. + /// + /// The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default + /// is 3. + /// string AutoScalerProfileOkTotalUnreadyCount { get; set; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer followed by + /// an 'm'. No unit of time other than minutes (m) is supported. /// string AutoScalerProfileScaleDownDelayAfterAdd { get; set; } /// - /// The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) - /// is supported. + /// How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// string AutoScalerProfileScaleDownDelayAfterDelete { get; set; } /// - /// The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// string AutoScalerProfileScaleDownDelayAfterFailure { get; set; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// string AutoScalerProfileScaleDownUnneededTime { get; set; } /// - /// The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long an unready node should be unneeded before it is eligible for scale down. The default is '20m'. Values must be + /// an integer followed by an 'm'. No unit of time other than minutes (m) is supported. /// string AutoScalerProfileScaleDownUnreadyTime { get; set; } - /// The default is '0.5'. + /// + /// Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered + /// for scale down. The default is '0.5'. + /// string AutoScalerProfileScaleDownUtilizationThreshold { get; set; } - /// The default is '10'. Values must be an integer number of seconds. + /// + /// How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds. + /// string AutoScalerProfileScanInterval { get; set; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. The default + /// is true. + /// string AutoScalerProfileSkipNodesWithLocalStorage { get; set; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods). The default + /// is true. + /// string AutoScalerProfileSkipNodesWithSystemPod { get; set; } /// The auto upgrade configuration. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAutoUpgradeProfile AutoUpgradeProfile { get; set; } /// - /// For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + /// Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("None", "Unmanaged", "NodeImage", "SecurityPatch")] + string AutoUpgradeProfileNodeOSUpgradeChannel { get; set; } + /// + /// The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster auto-upgrade + /// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("rapid", "stable", "patch", "node-image", "none")] string AutoUpgradeProfileUpgradeChannel { get; set; } @@ -1997,9 +2999,9 @@ internal partial interface IManagedClusterPropertiesInternal ///
string AzureKeyVaultKmKeyId { get; set; } /// - /// Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public - /// access from all networks. `Private` means the key vault disables public access and enables private link. The default value - /// is `Public`. + /// Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` + /// means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables + /// private link. The default value is `Public`. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Public", "Private")] string AzureKeyVaultKmKeyVaultNetworkAccess { get; set; } @@ -2017,15 +3019,39 @@ internal partial interface IManagedClusterPropertiesInternal ///
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileMetrics AzureMonitorProfileMetric { get; set; } /// - /// 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. + /// 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. /// string AzurePortalFqdn { get; set; } /// Whether to enable AzureBlob CSI Driver. The default value is false. bool? BlobCsiDriverEnabled { get; set; } + /// Profile of the cluster bootstrap configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterBootstrapProfile BootstrapProfile { get; set; } + /// The artifact source. The source where the artifacts are downloaded from. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Cache", "Direct")] + string BootstrapProfileArtifactSource { get; set; } + /// + /// The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy. + /// + string BootstrapProfileContainerRegistryId { get; set; } + /// Plugin certificates information for Service Mesh. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority CertificateAuthorityPlugin { get; set; } + /// Istio egress gateways. + System.Collections.Generic.List ComponentEgressGateway { get; set; } + /// Istio ingress gateways. + System.Collections.Generic.List ComponentIngressGateway { get; set; } + /// + /// Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. + /// Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If + /// not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. + /// + bool? CostAnalysisEnabled { get; set; } /// - /// If kubernetesVersion was a fully specified version , this field will be exactly equal to it. If kubernetesVersion - /// was , this field will contain the full version being used. + /// The version of Kubernetes the Managed Cluster is running. If kubernetesVersion was a fully specified version , + /// this field will be exactly equal to it. If kubernetesVersion was , this field will contain the full + /// version being used. /// string CurrentKubernetesVersion { get; set; } /// @@ -2039,37 +3065,40 @@ internal partial interface IManagedClusterPropertiesInternal /// Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderSecurityMonitoring DefenderSecurityMonitoring { get; set; } /// - /// If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters - /// that are AAD enabled. For more details see [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + /// If local accounts should be disabled on the Managed Cluster. If set to true, getting static credentials will be disabled + /// for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see [disable local + /// accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). /// bool? DisableLocalAccount { get; set; } /// Whether to enable AzureDisk CSI Driver. The default value is true. bool? DiskCsiDriverEnabled { get; set; } /// - /// This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' + /// The Resource ID of the disk encryption set to use for enabling encryption at rest. This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' /// string DiskEncryptionSetId { get; set; } - /// This cannot be updated once the Managed Cluster has been created. - string DnsPrefix { get; set; } /// - /// (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes - /// v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + /// The DNS prefix of the Managed Cluster. This cannot be updated once the Managed Cluster has been created. /// - bool? EnablePodSecurityPolicy { get; set; } + string DnsPrefix { get; set; } /// Whether to enable Kubernetes Role-Based Access Control. bool? EnableRbac { get; set; } /// Whether to enable AzureFile CSI Driver. The default value is true. bool? FileCsiDriverEnabled { get; set; } /// The FQDN of the master pool. string Fqdn { get; set; } - /// This cannot be updated once the Managed Cluster has been created. + /// + /// The FQDN subdomain of the private cluster with custom private dns zone. This cannot be updated once the Managed Cluster + /// has been created. + /// string FqdnSubdomain { get; set; } /// /// Specifies the DNS server for Windows gMSA.

Set it to empty if you have configured the DNS server in the vnet /// which is used to create the managed cluster. ///
string GmsaProfileDnsServer { get; set; } - /// Specifies whether to enable Windows gMSA in the managed cluster. + /// + /// Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster. + /// bool? GmsaProfileEnabled { get; set; } /// /// Specifies the root domain name for Windows gMSA.

Set it to empty if you have configured the DNS server in the @@ -2086,12 +3115,39 @@ internal partial interface IManagedClusterPropertiesInternal System.Collections.Generic.List HttpProxyConfigNoProxy { get; set; } /// Alternative CA cert to use for connecting to proxy servers. string HttpProxyConfigTrustedCa { get; set; } - /// Identities associated with the cluster. + /// The client ID of the user assigned identity. + string IdentityClientId { get; set; } + /// The object ID of the user assigned identity. + string IdentityObjectId { get; set; } + /// + /// The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned + /// identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". + /// Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesIdentityProfile IdentityProfile { get; set; } + /// The resource ID of the user assigned identity. + string IdentityResourceId { get; set; } /// Whether to enable Image Cleaner on AKS cluster. bool? ImageCleanerEnabled { get; set; } /// Image Cleaner scanning interval in hours. int? ImageCleanerIntervalHour { get; set; } + /// Ingress profile for the managed cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfile IngressProfile { get; set; } + /// + /// App Routing settings for the ingress profile. You can find an overview and onboarding guide for this feature at https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileWebAppRouting IngressProfileWebAppRouting { get; set; } + /// + /// Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described + /// here https://aka.ms/asm-plugin-ca + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority IstioCertificateAuthority { get; set; } + /// Istio components configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents IstioComponent { get; set; } + /// + /// The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary + /// upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + /// + System.Collections.Generic.List IstioRevision { get; set; } /// Whether to enable KEDA. bool? KedaEnabled { get; set; } /// @@ -2105,12 +3161,12 @@ internal partial interface IManagedClusterPropertiesInternal /// string KubeStateMetricLabelsAllowlist { get; set; } /// - /// Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When - /// is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same - /// once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. - /// When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed - /// sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, - /// however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) + /// The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + /// (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. + /// Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, + /// even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot + /// be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x + /// -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) /// for more details. /// string KubernetesVersion { get; set; } @@ -2132,10 +3188,38 @@ internal partial interface IManagedClusterPropertiesInternal /// pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. ///
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterAzureMonitorProfileKubeStateMetrics MetricKubeStateMetric { get; set; } + /// The configuration for detailed per-Kubernetes resource cost analysis. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterCostAnalysis MetricProfileCostAnalysis { get; set; } + /// Optional cluster metrics configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterMetricsProfile MetricsProfile { get; set; } /// The network configuration profile. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IContainerServiceNetworkProfile NetworkProfile { get; set; } + /// Ingress type for the default NginxIngressController custom resource + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("AnnotationControlled", "External", "Internal", "None")] + string NginxDefaultIngressControllerType { get; set; } + /// Node provisioning settings that apply to the whole cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeProvisioningProfile NodeProvisioningProfile { get; set; } + /// + /// The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless mode is + /// 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to + /// be deleted, which will drain and delete the nodes associated with those pools. It is strongly recommended to not do this + /// unless there are idle nodes ready to take the pods evicted by that action. If not specified, the default is Auto. For + /// more information see aka.ms/aks/nap#node-pools. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("None", "Auto")] + string NodeProvisioningProfileDefaultNodePool { get; set; } + /// The node provisioning mode. If not specified, the default is Manual. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Manual", "Auto")] + string NodeProvisioningProfileMode { get; set; } /// The name of the resource group containing agent pool nodes. string NodeResourceGroup { get; set; } + /// Profile of the node resource group configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterNodeResourceGroupProfile NodeResourceGroupProfile { get; set; } + /// + /// The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted' + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Unrestricted", "ReadOnly")] + string NodeResourceGroupProfileRestrictionLevel { get; set; } /// The OIDC issuer profile of the Managed Cluster. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterOidcIssuerProfile OidcIssuerProfile { get; set; } /// Whether the OIDC issuer is enabled. @@ -2143,13 +3227,35 @@ internal partial interface IManagedClusterPropertiesInternal /// The OIDC issuer url of the Managed Cluster. string OidcIssuerProfileIssuerUrl { get; set; } /// - /// See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod - /// identity integration. + /// Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections + /// such as checking for deprecated API usage. Enable this option only with caution. + /// + bool? OverrideSettingForceUpgrade { get; set; } + /// + /// Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness + /// won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. + /// It must be set for the overrides to take effect. + /// + global::System.DateTime? OverrideSettingUntil { get; set; } + /// Certificate chain object name in Azure Key Vault. + string PluginCertChainObjectName { get; set; } + /// Intermediate certificate object name in Azure Key Vault. + string PluginCertObjectName { get; set; } + /// Intermediate certificate private key object name in Azure Key Vault. + string PluginKeyObjectName { get; set; } + /// The resource ID of the Key Vault. + string PluginKeyVaultId { get; set; } + /// Root certificate object name in Azure Key Vault. + string PluginRootCertObjectName { get; set; } + /// + /// The pod identity profile of the Managed Cluster. See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on AAD pod identity integration. /// Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPodIdentityProfile PodIdentityProfile { get; set; } /// - /// Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. - /// See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + /// Whether pod identity is allowed to run on clusters with Kubenet networking. Running in Kubenet is disabled by default + /// due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin + /// with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) /// for more information. /// bool? PodIdentityProfileAllowNetworkPluginKubenet { get; set; } @@ -2168,11 +3274,27 @@ internal partial interface IManagedClusterPropertiesInternal string PrivateFqdn { get; set; } /// Private link resources associated with the cluster. System.Collections.Generic.List PrivateLinkResource { get; set; } + /// The error additional info. + System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get; set; } + /// The error code. + string ProvisioningErrorCode { get; set; } + /// The error details. + System.Collections.Generic.List ProvisioningErrorDetail { get; set; } + /// The error message. + string ProvisioningErrorMessage { get; set; } + /// The error target. + string ProvisioningErrorTarget { get; set; } /// The current provisioning state. string ProvisioningState { get; set; } - /// Allow or deny public network access for AKS + /// + /// PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS + /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Enabled", "Disabled")] string PublicNetworkAccess { get; set; } + /// + /// The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create sequence) + /// + string ResourceUid { get; set; } /// Whether to enable Defender threat detection bool? SecurityMonitoringEnabled { get; set; } /// Security profile for the managed cluster. @@ -2182,6 +3304,11 @@ internal partial interface IManagedClusterPropertiesInternal /// the security profile. ///
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAzureKeyVaultKms SecurityProfileAzureKeyVaultKm { get; set; } + /// + /// A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information + /// see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). + /// + System.Collections.Generic.List SecurityProfileCustomCaTrustCertificate { get; set; } /// Microsoft Defender settings for the security profile. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefender SecurityProfileDefender { get; set; } /// Image Cleaner settings for the security profile. @@ -2191,6 +3318,13 @@ internal partial interface IManagedClusterPropertiesInternal /// cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more details. ///
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileWorkloadIdentity SecurityProfileWorkloadIdentity { get; set; } + /// Service mesh profile for a managed cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile ServiceMeshProfile { get; set; } + /// Istio service mesh configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh ServiceMeshProfileIstio { get; set; } + /// Mode of the service mesh. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Istio", "Disabled")] + string ServiceMeshProfileMode { get; set; } /// /// Information about a service principal identity for the cluster to use for manipulating Azure APIs. /// @@ -2205,6 +3339,13 @@ internal partial interface IManagedClusterPropertiesInternal /// The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. ///
System.Collections.Generic.List SshPublicKey { get; set; } + /// Contains read-only information about the Managed Cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus Status { get; set; } + /// + /// The error details information of the managed cluster. Preserves the detailed info of failure. If there was no error, this + /// field is omitted. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail StatusProvisioningError { get; set; } /// Storage profile for the managed cluster. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfile StorageProfile { get; set; } /// AzureBlob CSI Driver settings for the storage profile. @@ -2216,6 +3357,35 @@ internal partial interface IManagedClusterPropertiesInternal /// Snapshot Controller settings for the storage profile. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStorageProfileSnapshotController StorageProfileSnapshotController { get; set; } /// + /// The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("KubernetesOfficial", "AKSLongTermSupport")] + string SupportPlan { get; set; } + /// Settings for upgrading a cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IClusterUpgradeSettings UpgradeSetting { get; set; } + /// Settings for overrides. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings UpgradeSettingOverrideSetting { get; set; } + /// Whether to enable VPA. Default value is false. + bool? VerticalPodAutoscalerEnabled { get; set; } + /// + /// Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing + /// add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be + /// in the same resource group and all private DNS zones must be in the same resource group. + /// + System.Collections.Generic.List WebAppRoutingDnsZoneResourceId { get; set; } + /// Whether to enable the Application Routing add-on. + bool? WebAppRoutingEnabled { get; set; } + /// + /// Managed identity of the Application Routing add-on. This is the identity that should be granted permissions, for example, + /// to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this overview of the add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) + /// for more instructions. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUserAssignedIdentity WebAppRoutingIdentity { get; set; } + /// + /// Configuration for the default NginxIngressController. See more at https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterIngressProfileNginx WebAppRoutingNginx { get; set; } + /// /// Specifies the password of the administrator account.

**Minimum-length:** 8 characters

**Max-length:** /// 123 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters ///
Has upper characters
Has a digit
Has a special character (Regex match [\W_])

**Disallowed values:** @@ -2230,7 +3400,7 @@ internal partial interface IManagedClusterPropertiesInternal ///
string WindowProfileAdminUsername { get; set; } /// - /// For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). + /// Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). /// bool? WindowProfileEnableCsiProxy { get; set; } /// The Windows gMSA Profile in the Managed Cluster. @@ -2249,6 +3419,8 @@ internal partial interface IManagedClusterPropertiesInternal /// KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. ///
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileKeda WorkloadAutoScalerProfileKeda { get; set; } + /// VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler WorkloadAutoScalerProfileVerticalPodAutoscaler { get; set; } /// Whether to enable workload identity. bool? WorkloadIdentityEnabled { get; set; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterProperties.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterProperties.json.cs index bba81b307348..6a6058ec3c3b 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterProperties.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterProperties.json.cs @@ -83,15 +83,24 @@ internal ManagedClusterProperties(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime {_servicePrincipalProfile = If( json?.PropertyT("servicePrincipalProfile"), out var __jsonServicePrincipalProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterServicePrincipalProfile.FromJson(__jsonServicePrincipalProfile) : _servicePrincipalProfile;} {_podIdentityProfile = If( json?.PropertyT("podIdentityProfile"), out var __jsonPodIdentityProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPodIdentityProfile.FromJson(__jsonPodIdentityProfile) : _podIdentityProfile;} {_oidcIssuerProfile = If( json?.PropertyT("oidcIssuerProfile"), out var __jsonOidcIssuerProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterOidcIssuerProfile.FromJson(__jsonOidcIssuerProfile) : _oidcIssuerProfile;} + {_nodeResourceGroupProfile = If( json?.PropertyT("nodeResourceGroupProfile"), out var __jsonNodeResourceGroupProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeResourceGroupProfile.FromJson(__jsonNodeResourceGroupProfile) : _nodeResourceGroupProfile;} {_aadProfile = If( json?.PropertyT("aadProfile"), out var __jsonAadProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAadProfile.FromJson(__jsonAadProfile) : _aadProfile;} {_autoUpgradeProfile = If( json?.PropertyT("autoUpgradeProfile"), out var __jsonAutoUpgradeProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAutoUpgradeProfile.FromJson(__jsonAutoUpgradeProfile) : _autoUpgradeProfile;} + {_upgradeSetting = If( json?.PropertyT("upgradeSettings"), out var __jsonUpgradeSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ClusterUpgradeSettings.FromJson(__jsonUpgradeSettings) : _upgradeSetting;} {_autoScalerProfile = If( json?.PropertyT("autoScalerProfile"), out var __jsonAutoScalerProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPropertiesAutoScalerProfile.FromJson(__jsonAutoScalerProfile) : _autoScalerProfile;} {_apiServerAccessProfile = If( json?.PropertyT("apiServerAccessProfile"), out var __jsonApiServerAccessProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterApiServerAccessProfile.FromJson(__jsonApiServerAccessProfile) : _apiServerAccessProfile;} {_httpProxyConfig = If( json?.PropertyT("httpProxyConfig"), out var __jsonHttpProxyConfig) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterHttpProxyConfig.FromJson(__jsonHttpProxyConfig) : _httpProxyConfig;} {_securityProfile = If( json?.PropertyT("securityProfile"), out var __jsonSecurityProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfile.FromJson(__jsonSecurityProfile) : _securityProfile;} {_storageProfile = If( json?.PropertyT("storageProfile"), out var __jsonStorageProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStorageProfile.FromJson(__jsonStorageProfile) : _storageProfile;} + {_ingressProfile = If( json?.PropertyT("ingressProfile"), out var __jsonIngressProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterIngressProfile.FromJson(__jsonIngressProfile) : _ingressProfile;} {_workloadAutoScalerProfile = If( json?.PropertyT("workloadAutoScalerProfile"), out var __jsonWorkloadAutoScalerProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfile.FromJson(__jsonWorkloadAutoScalerProfile) : _workloadAutoScalerProfile;} {_azureMonitorProfile = If( json?.PropertyT("azureMonitorProfile"), out var __jsonAzureMonitorProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAzureMonitorProfile.FromJson(__jsonAzureMonitorProfile) : _azureMonitorProfile;} + {_serviceMeshProfile = If( json?.PropertyT("serviceMeshProfile"), out var __jsonServiceMeshProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ServiceMeshProfile.FromJson(__jsonServiceMeshProfile) : _serviceMeshProfile;} + {_metricsProfile = If( json?.PropertyT("metricsProfile"), out var __jsonMetricsProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterMetricsProfile.FromJson(__jsonMetricsProfile) : _metricsProfile;} + {_nodeProvisioningProfile = If( json?.PropertyT("nodeProvisioningProfile"), out var __jsonNodeProvisioningProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterNodeProvisioningProfile.FromJson(__jsonNodeProvisioningProfile) : _nodeProvisioningProfile;} + {_bootstrapProfile = If( json?.PropertyT("bootstrapProfile"), out var __jsonBootstrapProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterBootstrapProfile.FromJson(__jsonBootstrapProfile) : _bootstrapProfile;} + {_aiToolchainOperatorProfile = If( json?.PropertyT("aiToolchainOperatorProfile"), out var __jsonAiToolchainOperatorProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterAiToolchainOperatorProfile.FromJson(__jsonAiToolchainOperatorProfile) : _aiToolchainOperatorProfile;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterStatus.FromJson(__jsonStatus) : _status;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} {_maxAgentPool = If( json?.PropertyT("maxAgentPools"), out var __jsonMaxAgentPools) ? (int?)__jsonMaxAgentPools : _maxAgentPool;} {_kubernetesVersion = If( json?.PropertyT("kubernetesVersion"), out var __jsonKubernetesVersion) ? (string)__jsonKubernetesVersion : (string)_kubernetesVersion;} @@ -105,12 +114,13 @@ internal ManagedClusterProperties(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime {_addonProfile = If( json?.PropertyT("addonProfiles"), out var __jsonAddonProfiles) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPropertiesAddonProfiles.FromJson(__jsonAddonProfiles) : _addonProfile;} {_nodeResourceGroup = If( json?.PropertyT("nodeResourceGroup"), out var __jsonNodeResourceGroup) ? (string)__jsonNodeResourceGroup : (string)_nodeResourceGroup;} {_enableRbac = If( json?.PropertyT("enableRBAC"), out var __jsonEnableRbac) ? (bool?)__jsonEnableRbac : _enableRbac;} - {_enablePodSecurityPolicy = If( json?.PropertyT("enablePodSecurityPolicy"), out var __jsonEnablePodSecurityPolicy) ? (bool?)__jsonEnablePodSecurityPolicy : _enablePodSecurityPolicy;} + {_supportPlan = If( json?.PropertyT("supportPlan"), out var __jsonSupportPlan) ? (string)__jsonSupportPlan : (string)_supportPlan;} {_diskEncryptionSetId = If( json?.PropertyT("diskEncryptionSetID"), out var __jsonDiskEncryptionSetId) ? (string)__jsonDiskEncryptionSetId : (string)_diskEncryptionSetId;} {_identityProfile = If( json?.PropertyT("identityProfile"), out var __jsonIdentityProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterPropertiesIdentityProfile.FromJson(__jsonIdentityProfile) : _identityProfile;} {_privateLinkResource = If( json?.PropertyT("privateLinkResources"), out var __jsonPrivateLinkResources) ? If( __jsonPrivateLinkResources as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkResource) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateLinkResource.FromJson(__p) )) ))() : null : _privateLinkResource;} {_disableLocalAccount = If( json?.PropertyT("disableLocalAccounts"), out var __jsonDisableLocalAccounts) ? (bool?)__jsonDisableLocalAccounts : _disableLocalAccount;} {_publicNetworkAccess = If( json?.PropertyT("publicNetworkAccess"), out var __jsonPublicNetworkAccess) ? (string)__jsonPublicNetworkAccess : (string)_publicNetworkAccess;} + {_resourceUid = If( json?.PropertyT("resourceUID"), out var __jsonResourceUid) ? (string)__jsonResourceUid : (string)_resourceUid;} {_networkProfile = If( json?.PropertyT("networkProfile"), out var __jsonNetworkProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ContainerServiceNetworkProfile.FromJson(__jsonNetworkProfile) : _networkProfile;} AfterFromJson(json); } @@ -143,15 +153,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro AddIf( null != this._servicePrincipalProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._servicePrincipalProfile.ToJson(null,serializationMode) : null, "servicePrincipalProfile" ,container.Add ); AddIf( null != this._podIdentityProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._podIdentityProfile.ToJson(null,serializationMode) : null, "podIdentityProfile" ,container.Add ); AddIf( null != this._oidcIssuerProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._oidcIssuerProfile.ToJson(null,serializationMode) : null, "oidcIssuerProfile" ,container.Add ); + AddIf( null != this._nodeResourceGroupProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._nodeResourceGroupProfile.ToJson(null,serializationMode) : null, "nodeResourceGroupProfile" ,container.Add ); AddIf( null != this._aadProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._aadProfile.ToJson(null,serializationMode) : null, "aadProfile" ,container.Add ); AddIf( null != this._autoUpgradeProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._autoUpgradeProfile.ToJson(null,serializationMode) : null, "autoUpgradeProfile" ,container.Add ); + AddIf( null != this._upgradeSetting ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._upgradeSetting.ToJson(null,serializationMode) : null, "upgradeSettings" ,container.Add ); AddIf( null != this._autoScalerProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._autoScalerProfile.ToJson(null,serializationMode) : null, "autoScalerProfile" ,container.Add ); AddIf( null != this._apiServerAccessProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._apiServerAccessProfile.ToJson(null,serializationMode) : null, "apiServerAccessProfile" ,container.Add ); AddIf( null != this._httpProxyConfig ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._httpProxyConfig.ToJson(null,serializationMode) : null, "httpProxyConfig" ,container.Add ); AddIf( null != this._securityProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._securityProfile.ToJson(null,serializationMode) : null, "securityProfile" ,container.Add ); AddIf( null != this._storageProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._storageProfile.ToJson(null,serializationMode) : null, "storageProfile" ,container.Add ); + AddIf( null != this._ingressProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._ingressProfile.ToJson(null,serializationMode) : null, "ingressProfile" ,container.Add ); AddIf( null != this._workloadAutoScalerProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._workloadAutoScalerProfile.ToJson(null,serializationMode) : null, "workloadAutoScalerProfile" ,container.Add ); AddIf( null != this._azureMonitorProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._azureMonitorProfile.ToJson(null,serializationMode) : null, "azureMonitorProfile" ,container.Add ); + AddIf( null != this._serviceMeshProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._serviceMeshProfile.ToJson(null,serializationMode) : null, "serviceMeshProfile" ,container.Add ); + AddIf( null != this._metricsProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._metricsProfile.ToJson(null,serializationMode) : null, "metricsProfile" ,container.Add ); + AddIf( null != this._nodeProvisioningProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._nodeProvisioningProfile.ToJson(null,serializationMode) : null, "nodeProvisioningProfile" ,container.Add ); + AddIf( null != this._bootstrapProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._bootstrapProfile.ToJson(null,serializationMode) : null, "bootstrapProfile" ,container.Add ); + AddIf( null != this._aiToolchainOperatorProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._aiToolchainOperatorProfile.ToJson(null,serializationMode) : null, "aiToolchainOperatorProfile" ,container.Add ); + AddIf( null != this._status ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._status.ToJson(null,serializationMode) : null, "status" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); @@ -191,7 +210,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro AddIf( null != this._addonProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._addonProfile.ToJson(null,serializationMode) : null, "addonProfiles" ,container.Add ); AddIf( null != (((object)this._nodeResourceGroup)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._nodeResourceGroup.ToString()) : null, "nodeResourceGroup" ,container.Add ); AddIf( null != this._enableRbac ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enableRbac) : null, "enableRBAC" ,container.Add ); - AddIf( null != this._enablePodSecurityPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enablePodSecurityPolicy) : null, "enablePodSecurityPolicy" ,container.Add ); + AddIf( null != (((object)this._supportPlan)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._supportPlan.ToString()) : null, "supportPlan" ,container.Add ); AddIf( null != (((object)this._diskEncryptionSetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._diskEncryptionSetId.ToString()) : null, "diskEncryptionSetID" ,container.Add ); AddIf( null != this._identityProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._identityProfile.ToJson(null,serializationMode) : null, "identityProfile" ,container.Add ); if (null != this._privateLinkResource) @@ -205,6 +224,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro } AddIf( null != this._disableLocalAccount ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._disableLocalAccount) : null, "disableLocalAccounts" ,container.Add ); AddIf( null != (((object)this._publicNetworkAccess)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._publicNetworkAccess.ToString()) : null, "publicNetworkAccess" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._resourceUid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._resourceUid.ToString()) : null, "resourceUID" ,container.Add ); + } AddIf( null != this._networkProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._networkProfile.ToJson(null,serializationMode) : null, "networkProfile" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesAutoScalerProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesAutoScalerProfile.PowerShell.cs index 34e84335b9f0..822b70eab87b 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesAutoScalerProfile.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesAutoScalerProfile.PowerShell.cs @@ -116,6 +116,18 @@ internal ManagedClusterPropertiesAutoScalerProfile(global::System.Collections.ID { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).BalanceSimilarNodeGroup = (string) content.GetValueForProperty("BalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).BalanceSimilarNodeGroup, global::System.Convert.ToString); } + if (content.Contains("DaemonsetEvictionForEmptyNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).DaemonsetEvictionForEmptyNode = (bool?) content.GetValueForProperty("DaemonsetEvictionForEmptyNode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).DaemonsetEvictionForEmptyNode, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DaemonsetEvictionForOccupiedNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).DaemonsetEvictionForOccupiedNode = (bool?) content.GetValueForProperty("DaemonsetEvictionForOccupiedNode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).DaemonsetEvictionForOccupiedNode, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IgnoreDaemonsetsUtilization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).IgnoreDaemonsetsUtilization = (bool?) content.GetValueForProperty("IgnoreDaemonsetsUtilization",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).IgnoreDaemonsetsUtilization, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("Expander")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).Expander = (string) content.GetValueForProperty("Expander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).Expander, global::System.Convert.ToString); @@ -201,6 +213,18 @@ internal ManagedClusterPropertiesAutoScalerProfile(global::System.Management.Aut { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).BalanceSimilarNodeGroup = (string) content.GetValueForProperty("BalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).BalanceSimilarNodeGroup, global::System.Convert.ToString); } + if (content.Contains("DaemonsetEvictionForEmptyNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).DaemonsetEvictionForEmptyNode = (bool?) content.GetValueForProperty("DaemonsetEvictionForEmptyNode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).DaemonsetEvictionForEmptyNode, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DaemonsetEvictionForOccupiedNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).DaemonsetEvictionForOccupiedNode = (bool?) content.GetValueForProperty("DaemonsetEvictionForOccupiedNode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).DaemonsetEvictionForOccupiedNode, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IgnoreDaemonsetsUtilization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).IgnoreDaemonsetsUtilization = (bool?) content.GetValueForProperty("IgnoreDaemonsetsUtilization",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).IgnoreDaemonsetsUtilization, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("Expander")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).Expander = (string) content.GetValueForProperty("Expander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesAutoScalerProfileInternal)this).Expander, global::System.Convert.ToString); diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesAutoScalerProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesAutoScalerProfile.cs index 9e787b7ab4a1..ad0fc9fad779 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesAutoScalerProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesAutoScalerProfile.cs @@ -16,31 +16,71 @@ public partial class ManagedClusterPropertiesAutoScalerProfile : /// Backing field for property. private string _balanceSimilarNodeGroup; - /// Valid values are 'true' and 'false' + /// + /// Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false' + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string BalanceSimilarNodeGroup { get => this._balanceSimilarNodeGroup; set => this._balanceSimilarNodeGroup = value; } + /// Backing field for property. + private bool? _daemonsetEvictionForEmptyNode; + + /// + /// DaemonSet pods will be gracefully terminated from empty nodes. If set to true, all daemonset pods on empty nodes will + /// be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? DaemonsetEvictionForEmptyNode { get => this._daemonsetEvictionForEmptyNode; set => this._daemonsetEvictionForEmptyNode = value; } + + /// Backing field for property. + private bool? _daemonsetEvictionForOccupiedNode; + + /// + /// DaemonSet pods will be gracefully terminated from non-empty nodes. If set to true, all daemonset pods on occupied nodes + /// will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? DaemonsetEvictionForOccupiedNode { get => this._daemonsetEvictionForOccupiedNode; set => this._daemonsetEvictionForOccupiedNode = value; } + /// Backing field for property. private string _expander; /// - /// If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + /// The expander to use when scaling up. If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) /// for more information. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Expander { get => this._expander; set => this._expander = value; } + /// Backing field for property. + private bool? _ignoreDaemonsetsUtilization; + + /// + /// Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the resources + /// used by daemonset will be taken into account when making scaling down decisions. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? IgnoreDaemonsetsUtilization { get => this._ignoreDaemonsetsUtilization; set => this._ignoreDaemonsetsUtilization = value; } + /// Backing field for property. private string _maxEmptyBulkDelete; - /// The default is 10. + /// + /// The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is + /// 10. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string MaxEmptyBulkDelete { get => this._maxEmptyBulkDelete; set => this._maxEmptyBulkDelete = value; } /// Backing field for property. private string _maxGracefulTerminationSec; - /// The default is 600. + /// + /// The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. The default + /// is 600. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string MaxGracefulTerminationSec { get => this._maxGracefulTerminationSec; set => this._maxGracefulTerminationSec = value; } @@ -48,7 +88,8 @@ public partial class ManagedClusterPropertiesAutoScalerProfile : private string _maxNodeProvisionTime; /// - /// The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string MaxNodeProvisionTime { get => this._maxNodeProvisionTime; set => this._maxNodeProvisionTime = value; } @@ -56,7 +97,10 @@ public partial class ManagedClusterPropertiesAutoScalerProfile : /// Backing field for property. private string _maxTotalUnreadyPercentage; - /// The default is 45. The maximum is 100 and the minimum is 0. + /// + /// The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler halts operations. + /// The default is 45. The maximum is 100 and the minimum is 0. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string MaxTotalUnreadyPercentage { get => this._maxTotalUnreadyPercentage; set => this._maxTotalUnreadyPercentage = value; } @@ -64,9 +108,10 @@ public partial class ManagedClusterPropertiesAutoScalerProfile : private string _newPodScaleUpDelay; /// - /// For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all - /// the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be - /// an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + /// Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want CA to + /// act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're + /// a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' + /// for hours, etc). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string NewPodScaleUpDelay { get => this._newPodScaleUpDelay; set => this._newPodScaleUpDelay = value; } @@ -74,7 +119,10 @@ public partial class ManagedClusterPropertiesAutoScalerProfile : /// Backing field for property. private string _okTotalUnreadyCount; - /// This must be an integer. The default is 3. + /// + /// The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default + /// is 3. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string OkTotalUnreadyCount { get => this._okTotalUnreadyCount; set => this._okTotalUnreadyCount = value; } @@ -82,7 +130,8 @@ public partial class ManagedClusterPropertiesAutoScalerProfile : private string _scaleDownDelayAfterAdd; /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer followed by + /// an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScaleDownDelayAfterAdd { get => this._scaleDownDelayAfterAdd; set => this._scaleDownDelayAfterAdd = value; } @@ -91,8 +140,8 @@ public partial class ManagedClusterPropertiesAutoScalerProfile : private string _scaleDownDelayAfterDelete; /// - /// The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) - /// is supported. + /// How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScaleDownDelayAfterDelete { get => this._scaleDownDelayAfterDelete; set => this._scaleDownDelayAfterDelete = value; } @@ -101,7 +150,8 @@ public partial class ManagedClusterPropertiesAutoScalerProfile : private string _scaleDownDelayAfterFailure; /// - /// The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScaleDownDelayAfterFailure { get => this._scaleDownDelayAfterFailure; set => this._scaleDownDelayAfterFailure = value; } @@ -110,7 +160,8 @@ public partial class ManagedClusterPropertiesAutoScalerProfile : private string _scaleDownUnneededTime; /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScaleDownUnneededTime { get => this._scaleDownUnneededTime; set => this._scaleDownUnneededTime = value; } @@ -119,7 +170,8 @@ public partial class ManagedClusterPropertiesAutoScalerProfile : private string _scaleDownUnreadyTime; /// - /// The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long an unready node should be unneeded before it is eligible for scale down. The default is '20m'. Values must be + /// an integer followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScaleDownUnreadyTime { get => this._scaleDownUnreadyTime; set => this._scaleDownUnreadyTime = value; } @@ -127,28 +179,39 @@ public partial class ManagedClusterPropertiesAutoScalerProfile : /// Backing field for property. private string _scaleDownUtilizationThreshold; - /// The default is '0.5'. + /// + /// Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered + /// for scale down. The default is '0.5'. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScaleDownUtilizationThreshold { get => this._scaleDownUtilizationThreshold; set => this._scaleDownUtilizationThreshold = value; } /// Backing field for property. private string _scanInterval; - /// The default is '10'. Values must be an integer number of seconds. + /// + /// How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScanInterval { get => this._scanInterval; set => this._scanInterval = value; } /// Backing field for property. private string _skipNodesWithLocalStorage; - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. The default + /// is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string SkipNodesWithLocalStorage { get => this._skipNodesWithLocalStorage; set => this._skipNodesWithLocalStorage = value; } /// Backing field for property. private string _skipNodesWithSystemPod; - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods). The default + /// is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string SkipNodesWithSystemPod { get => this._skipNodesWithSystemPod; set => this._skipNodesWithSystemPod = value; } @@ -164,19 +227,51 @@ public ManagedClusterPropertiesAutoScalerProfile() public partial interface IManagedClusterPropertiesAutoScalerProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { - /// Valid values are 'true' and 'false' + /// + /// Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false' + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Valid values are 'true' and 'false'", + Description = @"Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false'", SerializedName = @"balance-similar-node-groups", PossibleTypes = new [] { typeof(string) })] string BalanceSimilarNodeGroup { get; set; } /// - /// If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + /// DaemonSet pods will be gracefully terminated from empty nodes. If set to true, all daemonset pods on empty nodes will + /// be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"DaemonSet pods will be gracefully terminated from empty nodes. If set to true, all daemonset pods on empty nodes will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted.", + SerializedName = @"daemonset-eviction-for-empty-nodes", + PossibleTypes = new [] { typeof(bool) })] + bool? DaemonsetEvictionForEmptyNode { get; set; } + /// + /// DaemonSet pods will be gracefully terminated from non-empty nodes. If set to true, all daemonset pods on occupied nodes + /// will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"DaemonSet pods will be gracefully terminated from non-empty nodes. If set to true, all daemonset pods on occupied nodes will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted.", + SerializedName = @"daemonset-eviction-for-occupied-nodes", + PossibleTypes = new [] { typeof(bool) })] + bool? DaemonsetEvictionForOccupiedNode { get; set; } + /// + /// The expander to use when scaling up. If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) /// for more information. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -185,35 +280,56 @@ public partial interface IManagedClusterPropertiesAutoScalerProfile : Read = true, Create = true, Update = true, - Description = @"If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for more information.", + Description = @"The expander to use when scaling up. If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for more information.", SerializedName = @"expander", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("least-waste", "most-pods", "priority", "random")] string Expander { get; set; } - /// The default is 10. + /// + /// Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the resources + /// used by daemonset will be taken into account when making scaling down decisions. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is 10.", + Description = @"Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the resources used by daemonset will be taken into account when making scaling down decisions.", + SerializedName = @"ignore-daemonsets-utilization", + PossibleTypes = new [] { typeof(bool) })] + bool? IgnoreDaemonsetsUtilization { get; set; } + /// + /// The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is + /// 10. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is 10.", SerializedName = @"max-empty-bulk-delete", PossibleTypes = new [] { typeof(string) })] string MaxEmptyBulkDelete { get; set; } - /// The default is 600. + /// + /// The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. The default + /// is 600. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is 600.", + Description = @"The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. The default is 600.", SerializedName = @"max-graceful-termination-sec", PossibleTypes = new [] { typeof(string) })] string MaxGracefulTerminationSec { get; set; } /// - /// The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -221,25 +337,29 @@ public partial interface IManagedClusterPropertiesAutoScalerProfile : Read = true, Create = true, Update = true, - Description = @"The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"max-node-provision-time", PossibleTypes = new [] { typeof(string) })] string MaxNodeProvisionTime { get; set; } - /// The default is 45. The maximum is 100 and the minimum is 0. + /// + /// The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler halts operations. + /// The default is 45. The maximum is 100 and the minimum is 0. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is 45. The maximum is 100 and the minimum is 0.", + Description = @"The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler halts operations. The default is 45. The maximum is 100 and the minimum is 0.", SerializedName = @"max-total-unready-percentage", PossibleTypes = new [] { typeof(string) })] string MaxTotalUnreadyPercentage { get; set; } /// - /// For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all - /// the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be - /// an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + /// Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want CA to + /// act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're + /// a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' + /// for hours, etc). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -247,23 +367,27 @@ public partial interface IManagedClusterPropertiesAutoScalerProfile : Read = true, Create = true, Update = true, - Description = @"For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc).", + Description = @"Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc).", SerializedName = @"new-pod-scale-up-delay", PossibleTypes = new [] { typeof(string) })] string NewPodScaleUpDelay { get; set; } - /// This must be an integer. The default is 3. + /// + /// The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default + /// is 3. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"This must be an integer. The default is 3.", + Description = @"The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default is 3.", SerializedName = @"ok-total-unready-count", PossibleTypes = new [] { typeof(string) })] string OkTotalUnreadyCount { get; set; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer followed by + /// an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -271,13 +395,13 @@ public partial interface IManagedClusterPropertiesAutoScalerProfile : Read = true, Create = true, Update = true, - Description = @"The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-delay-after-add", PossibleTypes = new [] { typeof(string) })] string ScaleDownDelayAfterAdd { get; set; } /// - /// The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) - /// is supported. + /// How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -285,12 +409,13 @@ public partial interface IManagedClusterPropertiesAutoScalerProfile : Read = true, Create = true, Update = true, - Description = @"The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-delay-after-delete", PossibleTypes = new [] { typeof(string) })] string ScaleDownDelayAfterDelete { get; set; } /// - /// The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -298,12 +423,13 @@ public partial interface IManagedClusterPropertiesAutoScalerProfile : Read = true, Create = true, Update = true, - Description = @"The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-delay-after-failure", PossibleTypes = new [] { typeof(string) })] string ScaleDownDelayAfterFailure { get; set; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -311,12 +437,13 @@ public partial interface IManagedClusterPropertiesAutoScalerProfile : Read = true, Create = true, Update = true, - Description = @"The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-unneeded-time", PossibleTypes = new [] { typeof(string) })] string ScaleDownUnneededTime { get; set; } /// - /// The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long an unready node should be unneeded before it is eligible for scale down. The default is '20m'. Values must be + /// an integer followed by an 'm'. No unit of time other than minutes (m) is supported. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -324,51 +451,62 @@ public partial interface IManagedClusterPropertiesAutoScalerProfile : Read = true, Create = true, Update = true, - Description = @"The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", + Description = @"How long an unready node should be unneeded before it is eligible for scale down. The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.", SerializedName = @"scale-down-unready-time", PossibleTypes = new [] { typeof(string) })] string ScaleDownUnreadyTime { get; set; } - /// The default is '0.5'. + /// + /// Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered + /// for scale down. The default is '0.5'. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is '0.5'.", + Description = @"Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down. The default is '0.5'.", SerializedName = @"scale-down-utilization-threshold", PossibleTypes = new [] { typeof(string) })] string ScaleDownUtilizationThreshold { get; set; } - /// The default is '10'. Values must be an integer number of seconds. + /// + /// How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is '10'. Values must be an integer number of seconds.", + Description = @"How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds.", SerializedName = @"scan-interval", PossibleTypes = new [] { typeof(string) })] string ScanInterval { get; set; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. The default + /// is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is true.", + Description = @"If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. The default is true.", SerializedName = @"skip-nodes-with-local-storage", PossibleTypes = new [] { typeof(string) })] string SkipNodesWithLocalStorage { get; set; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods). The default + /// is true. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The default is true.", + Description = @"If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods). The default is true.", SerializedName = @"skip-nodes-with-system-pods", PossibleTypes = new [] { typeof(string) })] string SkipNodesWithSystemPod { get; set; } @@ -378,60 +516,108 @@ public partial interface IManagedClusterPropertiesAutoScalerProfile : internal partial interface IManagedClusterPropertiesAutoScalerProfileInternal { - /// Valid values are 'true' and 'false' + /// + /// Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false' + /// string BalanceSimilarNodeGroup { get; set; } /// - /// If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + /// DaemonSet pods will be gracefully terminated from empty nodes. If set to true, all daemonset pods on empty nodes will + /// be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + bool? DaemonsetEvictionForEmptyNode { get; set; } + /// + /// DaemonSet pods will be gracefully terminated from non-empty nodes. If set to true, all daemonset pods on occupied nodes + /// will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. + /// If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. + /// + bool? DaemonsetEvictionForOccupiedNode { get; set; } + /// + /// The expander to use when scaling up. If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) /// for more information. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("least-waste", "most-pods", "priority", "random")] string Expander { get; set; } - /// The default is 10. + /// + /// Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the resources + /// used by daemonset will be taken into account when making scaling down decisions. + /// + bool? IgnoreDaemonsetsUtilization { get; set; } + /// + /// The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is + /// 10. + /// string MaxEmptyBulkDelete { get; set; } - /// The default is 600. + /// + /// The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. The default + /// is 600. + /// string MaxGracefulTerminationSec { get; set; } /// - /// The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// string MaxNodeProvisionTime { get; set; } - /// The default is 45. The maximum is 100 and the minimum is 0. + /// + /// The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler halts operations. + /// The default is 45. The maximum is 100 and the minimum is 0. + /// string MaxTotalUnreadyPercentage { get; set; } /// - /// For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all - /// the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be - /// an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + /// Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want CA to + /// act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're + /// a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' + /// for hours, etc). /// string NewPodScaleUpDelay { get; set; } - /// This must be an integer. The default is 3. + /// + /// The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default + /// is 3. + /// string OkTotalUnreadyCount { get; set; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer followed by + /// an 'm'. No unit of time other than minutes (m) is supported. /// string ScaleDownDelayAfterAdd { get; set; } /// - /// The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) - /// is supported. + /// How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// string ScaleDownDelayAfterDelete { get; set; } /// - /// The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an integer followed + /// by an 'm'. No unit of time other than minutes (m) is supported. /// string ScaleDownDelayAfterFailure { get; set; } /// - /// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// string ScaleDownUnneededTime { get; set; } /// - /// The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + /// How long an unready node should be unneeded before it is eligible for scale down. The default is '20m'. Values must be + /// an integer followed by an 'm'. No unit of time other than minutes (m) is supported. /// string ScaleDownUnreadyTime { get; set; } - /// The default is '0.5'. + /// + /// Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered + /// for scale down. The default is '0.5'. + /// string ScaleDownUtilizationThreshold { get; set; } - /// The default is '10'. Values must be an integer number of seconds. + /// + /// How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds. + /// string ScanInterval { get; set; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. The default + /// is true. + /// string SkipNodesWithLocalStorage { get; set; } - /// The default is true. + /// + /// If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods). The default + /// is true. + /// string SkipNodesWithSystemPod { get; set; } } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesAutoScalerProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesAutoScalerProfile.json.cs index 5cc25794061e..4ba61197dbf3 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesAutoScalerProfile.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesAutoScalerProfile.json.cs @@ -78,6 +78,9 @@ internal ManagedClusterPropertiesAutoScalerProfile(Microsoft.Azure.PowerShell.Cm return; } {_balanceSimilarNodeGroup = If( json?.PropertyT("balance-similar-node-groups"), out var __jsonBalanceSimilarNodeGroups) ? (string)__jsonBalanceSimilarNodeGroups : (string)_balanceSimilarNodeGroup;} + {_daemonsetEvictionForEmptyNode = If( json?.PropertyT("daemonset-eviction-for-empty-nodes"), out var __jsonDaemonsetEvictionForEmptyNodes) ? (bool?)__jsonDaemonsetEvictionForEmptyNodes : _daemonsetEvictionForEmptyNode;} + {_daemonsetEvictionForOccupiedNode = If( json?.PropertyT("daemonset-eviction-for-occupied-nodes"), out var __jsonDaemonsetEvictionForOccupiedNodes) ? (bool?)__jsonDaemonsetEvictionForOccupiedNodes : _daemonsetEvictionForOccupiedNode;} + {_ignoreDaemonsetsUtilization = If( json?.PropertyT("ignore-daemonsets-utilization"), out var __jsonIgnoreDaemonsetsUtilization) ? (bool?)__jsonIgnoreDaemonsetsUtilization : _ignoreDaemonsetsUtilization;} {_expander = If( json?.PropertyT("expander"), out var __jsonExpander) ? (string)__jsonExpander : (string)_expander;} {_maxEmptyBulkDelete = If( json?.PropertyT("max-empty-bulk-delete"), out var __jsonMaxEmptyBulkDelete) ? (string)__jsonMaxEmptyBulkDelete : (string)_maxEmptyBulkDelete;} {_maxGracefulTerminationSec = If( json?.PropertyT("max-graceful-termination-sec"), out var __jsonMaxGracefulTerminationSec) ? (string)__jsonMaxGracefulTerminationSec : (string)_maxGracefulTerminationSec;} @@ -119,6 +122,9 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro return container; } AddIf( null != (((object)this._balanceSimilarNodeGroup)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._balanceSimilarNodeGroup.ToString()) : null, "balance-similar-node-groups" ,container.Add ); + AddIf( null != this._daemonsetEvictionForEmptyNode ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._daemonsetEvictionForEmptyNode) : null, "daemonset-eviction-for-empty-nodes" ,container.Add ); + AddIf( null != this._daemonsetEvictionForOccupiedNode ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._daemonsetEvictionForOccupiedNode) : null, "daemonset-eviction-for-occupied-nodes" ,container.Add ); + AddIf( null != this._ignoreDaemonsetsUtilization ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._ignoreDaemonsetsUtilization) : null, "ignore-daemonsets-utilization" ,container.Add ); AddIf( null != (((object)this._expander)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._expander.ToString()) : null, "expander" ,container.Add ); AddIf( null != (((object)this._maxEmptyBulkDelete)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._maxEmptyBulkDelete.ToString()) : null, "max-empty-bulk-delete" ,container.Add ); AddIf( null != (((object)this._maxGracefulTerminationSec)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._maxGracefulTerminationSec.ToString()) : null, "max-graceful-termination-sec" ,container.Add ); diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesIdentityProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesIdentityProfile.PowerShell.cs index 3101ee786001..c4f2ce18e497 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesIdentityProfile.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesIdentityProfile.PowerShell.cs @@ -7,7 +7,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// Identities associated with the cluster. + /// + /// The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned + /// identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". + /// [System.ComponentModel.TypeConverter(typeof(ManagedClusterPropertiesIdentityProfileTypeConverter))] public partial class ManagedClusterPropertiesIdentityProfile { @@ -153,7 +156,8 @@ public override string ToString() return ToJsonString(); } } - /// Identities associated with the cluster. + /// The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned + /// identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". [System.ComponentModel.TypeConverter(typeof(ManagedClusterPropertiesIdentityProfileTypeConverter))] public partial interface IManagedClusterPropertiesIdentityProfile diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesIdentityProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesIdentityProfile.cs index 493b6ed68ec6..3a5f82f49cc8 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesIdentityProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesIdentityProfile.cs @@ -7,7 +7,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Identities associated with the cluster. + /// + /// The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned + /// identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". + /// public partial class ManagedClusterPropertiesIdentityProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesIdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPropertiesIdentityProfileInternal @@ -19,14 +22,16 @@ public ManagedClusterPropertiesIdentityProfile() } } - /// Identities associated with the cluster. + /// The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned + /// identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". public partial interface IManagedClusterPropertiesIdentityProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray { } - /// Identities associated with the cluster. + /// The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned + /// identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". internal partial interface IManagedClusterPropertiesIdentityProfileInternal { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesIdentityProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesIdentityProfile.json.cs index 24ef57d1895e..d960f207919a 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesIdentityProfile.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterPropertiesIdentityProfile.json.cs @@ -7,7 +7,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Identities associated with the cluster. + /// + /// The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned + /// identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". + /// public partial class ManagedClusterPropertiesIdentityProfile { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSecurityProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSecurityProfile.PowerShell.cs index a5d62d082780..cdc8678977e8 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSecurityProfile.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSecurityProfile.PowerShell.cs @@ -125,6 +125,10 @@ internal ManagedClusterSecurityProfile(global::System.Collections.IDictionary co { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)this).ImageCleaner = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileImageCleaner) content.GetValueForProperty("ImageCleaner",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)this).ImageCleaner, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfileImageCleanerTypeConverter.ConvertFrom); } + if (content.Contains("CustomCaTrustCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)this).CustomCaTrustCertificate = (System.Collections.Generic.List) content.GetValueForProperty("CustomCaTrustCertificate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)this).CustomCaTrustCertificate, __y => TypeConverterExtensions.SelectToList(__y, i => i)); + } if (content.Contains("AzureKeyVaultKmKeyId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyId, global::System.Convert.ToString); @@ -198,6 +202,10 @@ internal ManagedClusterSecurityProfile(global::System.Management.Automation.PSOb { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)this).ImageCleaner = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileImageCleaner) content.GetValueForProperty("ImageCleaner",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)this).ImageCleaner, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfileImageCleanerTypeConverter.ConvertFrom); } + if (content.Contains("CustomCaTrustCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)this).CustomCaTrustCertificate = (System.Collections.Generic.List) content.GetValueForProperty("CustomCaTrustCertificate",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)this).CustomCaTrustCertificate, __y => TypeConverterExtensions.SelectToList(__y, i => i)); + } if (content.Contains("AzureKeyVaultKmKeyId")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyId, global::System.Convert.ToString); diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSecurityProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSecurityProfile.cs index 51adb46521ef..9ef4f18f7420 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSecurityProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSecurityProfile.cs @@ -36,9 +36,9 @@ public partial class ManagedClusterSecurityProfile : public string AzureKeyVaultKmKeyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAzureKeyVaultKmsInternal)AzureKeyVaultKm).KeyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAzureKeyVaultKmsInternal)AzureKeyVaultKm).KeyId = value ?? null; } /// - /// Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public - /// access from all networks. `Private` means the key vault disables public access and enables private link. The default value - /// is `Public`. + /// Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` + /// means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables + /// private link. The default value is `Public`. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AzureKeyVaultKmKeyVaultNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAzureKeyVaultKmsInternal)AzureKeyVaultKm).KeyVaultNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAzureKeyVaultKmsInternal)AzureKeyVaultKm).KeyVaultNetworkAccess = value ?? null; } @@ -50,6 +50,16 @@ public partial class ManagedClusterSecurityProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string AzureKeyVaultKmKeyVaultResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAzureKeyVaultKmsInternal)AzureKeyVaultKm).KeyVaultResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAzureKeyVaultKmsInternal)AzureKeyVaultKm).KeyVaultResourceId = value ?? null; } + /// Backing field for property. + private System.Collections.Generic.List _customCaTrustCertificate; + + /// + /// A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information + /// see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List CustomCaTrustCertificate { get => this._customCaTrustCertificate; set => this._customCaTrustCertificate = value; } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefender _defender; @@ -87,7 +97,7 @@ public partial class ManagedClusterSecurityProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefender Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal.Defender { get => (this._defender = this._defender ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfileDefender()); set { {_defender = value;} } } /// Internal Acessors for DefenderSecurityMonitoring - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderSecurityMonitoring Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal.DefenderSecurityMonitoring { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderInternal)Defender).SecurityMonitoring; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderInternal)Defender).SecurityMonitoring = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderSecurityMonitoring Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal.DefenderSecurityMonitoring { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderInternal)Defender).SecurityMonitoring; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefenderInternal)Defender).SecurityMonitoring = value ?? null /* model class */; } /// Internal Acessors for ImageCleaner Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileImageCleaner Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileInternal.ImageCleaner { get => (this._imageCleaner = this._imageCleaner ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfileImageCleaner()); set { {_imageCleaner = value;} } } @@ -150,9 +160,9 @@ public partial interface IManagedClusterSecurityProfile : PossibleTypes = new [] { typeof(string) })] string AzureKeyVaultKmKeyId { get; set; } /// - /// Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public - /// access from all networks. `Private` means the key vault disables public access and enables private link. The default value - /// is `Public`. + /// Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` + /// means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables + /// private link. The default value is `Public`. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -160,7 +170,7 @@ public partial interface IManagedClusterSecurityProfile : Read = true, Create = true, Update = true, - Description = @"Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables private link. The default value is `Public`.", + Description = @"Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables private link. The default value is `Public`.", SerializedName = @"keyVaultNetworkAccess", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Public", "Private")] @@ -180,6 +190,20 @@ public partial interface IManagedClusterSecurityProfile : PossibleTypes = new [] { typeof(string) })] string AzureKeyVaultKmKeyVaultResourceId { get; set; } /// + /// A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information + /// see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority).", + SerializedName = @"customCATrustCertificates", + PossibleTypes = new [] { typeof(byte[]) })] + System.Collections.Generic.List CustomCaTrustCertificate { get; set; } + /// /// Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is enabled, /// this field is required and must be a valid workspace resource ID. When Microsoft Defender is disabled, leave the field /// empty. @@ -258,9 +282,9 @@ internal partial interface IManagedClusterSecurityProfileInternal /// string AzureKeyVaultKmKeyId { get; set; } /// - /// Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public - /// access from all networks. `Private` means the key vault disables public access and enables private link. The default value - /// is `Public`. + /// Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. `Public` + /// means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables + /// private link. The default value is `Public`. /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Public", "Private")] string AzureKeyVaultKmKeyVaultNetworkAccess { get; set; } @@ -269,6 +293,11 @@ internal partial interface IManagedClusterSecurityProfileInternal /// ID. When keyVaultNetworkAccess is `Public`, leave the field empty. ///
string AzureKeyVaultKmKeyVaultResourceId { get; set; } + /// + /// A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information + /// see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). + /// + System.Collections.Generic.List CustomCaTrustCertificate { get; set; } /// Microsoft Defender settings for the security profile. Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterSecurityProfileDefender Defender { get; set; } /// diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSecurityProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSecurityProfile.json.cs index 7d65eaa545dd..f8c9906a3f2c 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSecurityProfile.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSecurityProfile.json.cs @@ -81,6 +81,7 @@ internal ManagedClusterSecurityProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Ru {_azureKeyVaultKm = If( json?.PropertyT("azureKeyVaultKms"), out var __jsonAzureKeyVaultKms) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AzureKeyVaultKms.FromJson(__jsonAzureKeyVaultKms) : _azureKeyVaultKm;} {_workloadIdentity = If( json?.PropertyT("workloadIdentity"), out var __jsonWorkloadIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfileWorkloadIdentity.FromJson(__jsonWorkloadIdentity) : _workloadIdentity;} {_imageCleaner = If( json?.PropertyT("imageCleaner"), out var __jsonImageCleaner) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterSecurityProfileImageCleaner.FromJson(__jsonImageCleaner) : _imageCleaner;} + {_customCaTrustCertificate = If( json?.PropertyT("customCATrustCertificates"), out var __jsonCustomCaTrustCertificates) ? If( __jsonCustomCaTrustCertificates as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(byte[]) (null /* deserializeFromNode doesn't support 'application/json' C:\Users\cloudtest\.autorest\@autorest_powershell@4.0.750\node_modules\@autorest\powershell\dist\llcsharp\schema\byte-array.js*/)) ))() : null : _customCaTrustCertificate;} AfterFromJson(json); } @@ -107,6 +108,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro AddIf( null != this._azureKeyVaultKm ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._azureKeyVaultKm.ToJson(null,serializationMode) : null, "azureKeyVaultKms" ,container.Add ); AddIf( null != this._workloadIdentity ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._workloadIdentity.ToJson(null,serializationMode) : null, "workloadIdentity" ,container.Add ); AddIf( null != this._imageCleaner ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._imageCleaner.ToJson(null,serializationMode) : null, "imageCleaner" ,container.Add ); + if (null != this._customCaTrustCertificate) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._customCaTrustCertificate ) + { + AddIf(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(System.Convert.ToBase64String(__x)) ,__w.Add); + } + container.Add("customCATrustCertificates",__w); + } AfterToJson(ref container); return container; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSku.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSku.cs index 72a08dc8d627..ff320615e839 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSku.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterSku.cs @@ -24,7 +24,7 @@ public partial class ManagedClusterSku : private string _tier; /// - /// If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) + /// The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) /// for more details. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] @@ -50,10 +50,10 @@ public partial interface IManagedClusterSku : Description = @"The name of a managed cluster SKU.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Base")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Base", "Automatic")] string Name { get; set; } /// - /// If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) + /// The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) /// for more details. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -62,10 +62,10 @@ public partial interface IManagedClusterSku : Read = true, Create = true, Update = true, - Description = @"If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details.", + Description = @"The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details.", SerializedName = @"tier", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Standard", "Free")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Premium", "Standard", "Free")] string Tier { get; set; } } @@ -74,13 +74,13 @@ internal partial interface IManagedClusterSkuInternal { /// The name of a managed cluster SKU. - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Base")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Base", "Automatic")] string Name { get; set; } /// - /// If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) + /// The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) /// for more details. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Standard", "Free")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Premium", "Standard", "Free")] string Tier { get; set; } } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStaticEgressGatewayProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStaticEgressGatewayProfile.PowerShell.cs new file mode 100644 index 000000000000..7b47ef83b68f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStaticEgressGatewayProfile.PowerShell.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The Static Egress Gateway addon configuration for the cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterStaticEgressGatewayProfileTypeConverter))] + public partial class ManagedClusterStaticEgressGatewayProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterStaticEgressGatewayProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterStaticEgressGatewayProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedClusterStaticEgressGatewayProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfileInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterStaticEgressGatewayProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfileInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The Static Egress Gateway addon configuration for the cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterStaticEgressGatewayProfileTypeConverter))] + public partial interface IManagedClusterStaticEgressGatewayProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStaticEgressGatewayProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStaticEgressGatewayProfile.TypeConverter.cs new file mode 100644 index 000000000000..34bdb2e57708 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStaticEgressGatewayProfile.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterStaticEgressGatewayProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterStaticEgressGatewayProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterStaticEgressGatewayProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterStaticEgressGatewayProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStaticEgressGatewayProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStaticEgressGatewayProfile.cs new file mode 100644 index 000000000000..0d0d021e54cf --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStaticEgressGatewayProfile.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The Static Egress Gateway addon configuration for the cluster. + public partial class ManagedClusterStaticEgressGatewayProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfileInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// + /// Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled or not. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? Enabled { get => this._enabled; set => this._enabled = value; } + + /// + /// Creates an new instance. + /// + public ManagedClusterStaticEgressGatewayProfile() + { + + } + } + /// The Static Egress Gateway addon configuration for the cluster. + public partial interface IManagedClusterStaticEgressGatewayProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled or not. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled or not.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + + } + /// The Static Egress Gateway addon configuration for the cluster. + internal partial interface IManagedClusterStaticEgressGatewayProfileInternal + + { + /// + /// Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled or not. + /// + bool? Enabled { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStaticEgressGatewayProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStaticEgressGatewayProfile.json.cs new file mode 100644 index 000000000000..f52edaeaa77c --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStaticEgressGatewayProfile.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The Static Egress Gateway addon configuration for the cluster. + public partial class ManagedClusterStaticEgressGatewayProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStaticEgressGatewayProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterStaticEgressGatewayProfile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedClusterStaticEgressGatewayProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : _enabled;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._enabled ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enabled) : null, "enabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStatus.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStatus.PowerShell.cs new file mode 100644 index 000000000000..97558ced19b2 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStatus.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Contains read-only information about the Managed Cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterStatusTypeConverter))] + public partial class ManagedClusterStatus + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterStatus(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterStatus(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedClusterStatus(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("ProvisioningError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorCode = (string) content.GetValueForProperty("ProvisioningErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorMessage = (string) content.GetValueForProperty("ProvisioningErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorTarget = (string) content.GetValueForProperty("ProvisioningErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorTarget, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorDetail = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterStatus(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) content.GetValueForProperty("ProvisioningError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorCode = (string) content.GetValueForProperty("ProvisioningErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorMessage = (string) content.GetValueForProperty("ProvisioningErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorTarget = (string) content.GetValueForProperty("ProvisioningErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorTarget, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorDetail = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningErrorAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningErrorAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal)this).ProvisioningErrorAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Contains read-only information about the Managed Cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterStatusTypeConverter))] + public partial interface IManagedClusterStatus + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionPropertyList.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStatus.TypeConverter.cs similarity index 88% rename from generated/Aks/Aks.Autorest/generated/api/Models/OSOptionPropertyList.TypeConverter.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStatus.TypeConverter.cs index 06498065b46f..7e1614e48948 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionPropertyList.TypeConverter.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStatus.TypeConverter.cs @@ -8,9 +8,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class OSOptionPropertyListTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class ManagedClusterStatusTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class OSOptionPropertyListTypeConverter : global::System.Manageme public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// not used by this TypeConverter. /// when set to true, will ignore the case when converting. /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter into an instance of + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus).IsAssignableFrom(type)) { return sourceValue; } try { - return OSOptionPropertyList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return ManagedClusterStatus.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyLis } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return OSOptionPropertyList.DeserializeFromPSObject(sourceValue); + return ManagedClusterStatus.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return OSOptionPropertyList.DeserializeFromDictionary(sourceValue); + return ManagedClusterStatus.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStatus.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStatus.cs new file mode 100644 index 000000000000..d2c85b6f8865 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStatus.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Contains read-only information about the Managed Cluster. + public partial class ManagedClusterStatus : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal + { + + /// Internal Acessors for ProvisioningError + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal.ProvisioningError { get => (this._provisioningError = this._provisioningError ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetail()); set { {_provisioningError = value;} } } + + /// Internal Acessors for ProvisioningErrorAdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal.ProvisioningErrorAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).AdditionalInfo = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningErrorCode + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal.ProvisioningErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Code = value ?? null; } + + /// Internal Acessors for ProvisioningErrorDetail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal.ProvisioningErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Detail = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningErrorMessage + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal.ProvisioningErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Message = value ?? null; } + + /// Internal Acessors for ProvisioningErrorTarget + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatusInternal.ProvisioningErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Target = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail _provisioningError; + + /// + /// The error details information of the managed cluster. Preserves the detailed info of failure. If there was no error, this + /// field is omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail ProvisioningError { get => (this._provisioningError = this._provisioningError ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetail()); } + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ProvisioningErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Detail; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Message; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetailInternal)ProvisioningError).Target; } + + /// Creates an new instance. + public ManagedClusterStatus() + { + + } + } + /// Contains read-only information about the Managed Cluster. + public partial interface IManagedClusterStatus : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorCode { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail) })] + System.Collections.Generic.List ProvisioningErrorDetail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorMessage { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningErrorTarget { get; } + + } + /// Contains read-only information about the Managed Cluster. + internal partial interface IManagedClusterStatusInternal + + { + /// + /// The error details information of the managed cluster. Preserves the detailed info of failure. If there was no error, this + /// field is omitted. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorDetail ProvisioningError { get; set; } + /// The error additional info. + System.Collections.Generic.List ProvisioningErrorAdditionalInfo { get; set; } + /// The error code. + string ProvisioningErrorCode { get; set; } + /// The error details. + System.Collections.Generic.List ProvisioningErrorDetail { get; set; } + /// The error message. + string ProvisioningErrorMessage { get; set; } + /// The error target. + string ProvisioningErrorTarget { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStatus.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStatus.json.cs new file mode 100644 index 000000000000..457e091f37fe --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterStatus.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Contains read-only information about the Managed Cluster. + public partial class ManagedClusterStatus + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterStatus(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedClusterStatus(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provisioningError = If( json?.PropertyT("provisioningError"), out var __jsonProvisioningError) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ErrorDetail.FromJson(__jsonProvisioningError) : _provisioningError;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._provisioningError ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._provisioningError.ToJson(null,serializationMode) : null, "provisioningError" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterUpgradeProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterUpgradeProfile.cs index 31194da71143..759419559994 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterUpgradeProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterUpgradeProfile.cs @@ -41,7 +41,7 @@ public partial class ManagedClusterUpgradeProfile : public string Id { get => this._id; } /// Internal Acessors for ControlPlaneProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPoolUpgradeProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterUpgradeProfileInternal.ControlPlaneProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPoolUpgradeProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterUpgradeProfileInternal.ControlPlaneProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfile = value ?? null /* model class */; } /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterUpgradeProfileInternal.Id { get => this._id; set { {_id = value;} } } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWindowsProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWindowsProfile.cs index 80f6be641515..2e23afcfa197 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWindowsProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWindowsProfile.cs @@ -41,7 +41,7 @@ public partial class ManagedClusterWindowsProfile : private bool? _enableCsiProxy; /// - /// For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). + /// Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public bool? EnableCsiProxy { get => this._enableCsiProxy; set => this._enableCsiProxy = value; } @@ -60,7 +60,9 @@ public partial class ManagedClusterWindowsProfile : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public string GmsaProfileDnsServer { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWindowsGmsaProfileInternal)GmsaProfile).DnsServer; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWindowsGmsaProfileInternal)GmsaProfile).DnsServer = value ?? null; } - /// Specifies whether to enable Windows gMSA in the managed cluster. + /// + /// Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] public bool? GmsaProfileEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWindowsGmsaProfileInternal)GmsaProfile).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWindowsGmsaProfileInternal)GmsaProfile).Enabled = value ?? default(bool); } @@ -127,7 +129,7 @@ public partial interface IManagedClusterWindowsProfile : PossibleTypes = new [] { typeof(string) })] string AdminUsername { get; set; } /// - /// For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). + /// Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -135,7 +137,7 @@ public partial interface IManagedClusterWindowsProfile : Read = true, Create = true, Update = true, - Description = @"For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy).", + Description = @"Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy).", SerializedName = @"enableCSIProxy", PossibleTypes = new [] { typeof(bool) })] bool? EnableCsiProxy { get; set; } @@ -153,14 +155,16 @@ public partial interface IManagedClusterWindowsProfile : SerializedName = @"dnsServer", PossibleTypes = new [] { typeof(string) })] string GmsaProfileDnsServer { get; set; } - /// Specifies whether to enable Windows gMSA in the managed cluster. + /// + /// Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Specifies whether to enable Windows gMSA in the managed cluster.", + Description = @"Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster.", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] bool? GmsaProfileEnabled { get; set; } @@ -214,7 +218,7 @@ internal partial interface IManagedClusterWindowsProfileInternal /// string AdminUsername { get; set; } /// - /// For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). + /// Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). /// bool? EnableCsiProxy { get; set; } /// The Windows gMSA Profile in the Managed Cluster. @@ -224,7 +228,9 @@ internal partial interface IManagedClusterWindowsProfileInternal /// which is used to create the managed cluster. /// string GmsaProfileDnsServer { get; set; } - /// Specifies whether to enable Windows gMSA in the managed cluster. + /// + /// Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster. + /// bool? GmsaProfileEnabled { get; set; } /// /// Specifies the root domain name for Windows gMSA.

Set it to empty if you have configured the DNS server in the diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfile.PowerShell.cs index c1cb8e4f22e5..87567cb84360 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfile.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfile.PowerShell.cs @@ -116,10 +116,18 @@ internal ManagedClusterWorkloadAutoScalerProfile(global::System.Collections.IDic { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).Keda = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileKeda) content.GetValueForProperty("Keda",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).Keda, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter.ConvertFrom); } + if (content.Contains("VerticalPodAutoscaler")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).VerticalPodAutoscaler = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) content.GetValueForProperty("VerticalPodAutoscaler",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).VerticalPodAutoscaler, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerTypeConverter.ConvertFrom); + } if (content.Contains("KedaEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).KedaEnabled = (bool?) content.GetValueForProperty("KedaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).KedaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("VerticalPodAutoscalerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).VerticalPodAutoscalerEnabled = (bool?) content.GetValueForProperty("VerticalPodAutoscalerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).VerticalPodAutoscalerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } AfterDeserializeDictionary(content); } @@ -141,10 +149,18 @@ internal ManagedClusterWorkloadAutoScalerProfile(global::System.Management.Autom { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).Keda = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileKeda) content.GetValueForProperty("Keda",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).Keda, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter.ConvertFrom); } + if (content.Contains("VerticalPodAutoscaler")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).VerticalPodAutoscaler = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) content.GetValueForProperty("VerticalPodAutoscaler",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).VerticalPodAutoscaler, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerTypeConverter.ConvertFrom); + } if (content.Contains("KedaEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).KedaEnabled = (bool?) content.GetValueForProperty("KedaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).KedaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("VerticalPodAutoscalerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).VerticalPodAutoscalerEnabled = (bool?) content.GetValueForProperty("VerticalPodAutoscalerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal)this).VerticalPodAutoscalerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } AfterDeserializePSObject(content); } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfile.cs index edf02e8900bb..032b3957b89d 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfile.cs @@ -29,6 +29,20 @@ public partial class ManagedClusterWorkloadAutoScalerProfile : /// Internal Acessors for Keda Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileKeda Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal.Keda { get => (this._keda = this._keda ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileKeda()); set { {_keda = value;} } } + /// Internal Acessors for VerticalPodAutoscaler + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileInternal.VerticalPodAutoscaler { get => (this._verticalPodAutoscaler = this._verticalPodAutoscaler ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler()); set { {_verticalPodAutoscaler = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler _verticalPodAutoscaler; + + /// VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler VerticalPodAutoscaler { get => (this._verticalPodAutoscaler = this._verticalPodAutoscaler ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler()); set => this._verticalPodAutoscaler = value; } + + /// Whether to enable VPA. Default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? VerticalPodAutoscalerEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerInternal)VerticalPodAutoscaler).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerInternal)VerticalPodAutoscaler).Enabled = value ?? default(bool); } + /// Creates an new instance. public ManagedClusterWorkloadAutoScalerProfile() { @@ -50,6 +64,17 @@ public partial interface IManagedClusterWorkloadAutoScalerProfile : SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] bool? KedaEnabled { get; set; } + /// Whether to enable VPA. Default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable VPA. Default value is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? VerticalPodAutoscalerEnabled { get; set; } } /// Workload Auto-scaler profile for the managed cluster. @@ -62,6 +87,10 @@ internal partial interface IManagedClusterWorkloadAutoScalerProfileInternal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileKeda Keda { get; set; } /// Whether to enable KEDA. bool? KedaEnabled { get; set; } + /// VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler VerticalPodAutoscaler { get; set; } + /// Whether to enable VPA. Default value is false. + bool? VerticalPodAutoscalerEnabled { get; set; } } } \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfile.json.cs index 961a3916a8f8..c37bd21ae5f8 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfile.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfile.json.cs @@ -78,6 +78,7 @@ internal ManagedClusterWorkloadAutoScalerProfile(Microsoft.Azure.PowerShell.Cmdl return; } {_keda = If( json?.PropertyT("keda"), out var __jsonKeda) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileKeda.FromJson(__jsonKeda) : _keda;} + {_verticalPodAutoscaler = If( json?.PropertyT("verticalPodAutoscaler"), out var __jsonVerticalPodAutoscaler) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.FromJson(__jsonVerticalPodAutoscaler) : _verticalPodAutoscaler;} AfterFromJson(json); } @@ -103,6 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro return container; } AddIf( null != this._keda ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._keda.ToJson(null,serializationMode) : null, "keda" ,container.Add ); + AddIf( null != this._verticalPodAutoscaler ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._verticalPodAutoscaler.ToJson(null,serializationMode) : null, "verticalPodAutoscaler" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.PowerShell.cs new file mode 100644 index 000000000000..8a5efb96edbc --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.PowerShell.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerTypeConverter))] + public partial class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(content); + } + + /// + /// Creates a new instance of , deserializing the + /// content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerTypeConverter))] + public partial interface IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.TypeConverter.cs new file mode 100644 index 000000000000..0c4a5e68aceb --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is + /// no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is + /// no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.cs new file mode 100644 index 000000000000..5c4c3716f3da --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + public partial class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerInternal + { + + /// Backing field for property. + private bool _enabled; + + /// Whether to enable VPA. Default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool Enabled { get => this._enabled; set => this._enabled = value; } + + /// + /// Creates an new instance. + /// + public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler() + { + + } + } + /// VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + public partial interface IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable VPA. Default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to enable VPA. Default value is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool Enabled { get; set; } + + } + /// VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + internal partial interface IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscalerInternal + + { + /// Whether to enable VPA. Default value is false. + bool Enabled { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.json.cs new file mode 100644 index 000000000000..30f54fe0f7f1 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + public partial class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool)__jsonEnabled : _enabled;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean(this._enabled), "enabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManualScaleProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManualScaleProfile.PowerShell.cs new file mode 100644 index 000000000000..3ad9041f75f8 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManualScaleProfile.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Specifications on number of machines. + [System.ComponentModel.TypeConverter(typeof(ManualScaleProfileTypeConverter))] + public partial class ManualScaleProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManualScaleProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManualScaleProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManualScaleProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Size")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfileInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfileInternal)this).Size, global::System.Convert.ToString); + } + if (content.Contains("Count")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfileInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfileInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManualScaleProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Size")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfileInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfileInternal)this).Size, global::System.Convert.ToString); + } + if (content.Contains("Count")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfileInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfileInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Specifications on number of machines. + [System.ComponentModel.TypeConverter(typeof(ManualScaleProfileTypeConverter))] + public partial interface IManualScaleProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManualScaleProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManualScaleProfile.TypeConverter.cs new file mode 100644 index 000000000000..ac21756c5028 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManualScaleProfile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManualScaleProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManualScaleProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManualScaleProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManualScaleProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManualScaleProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManualScaleProfile.cs new file mode 100644 index 000000000000..b0c0ed7d8ede --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManualScaleProfile.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Specifications on number of machines. + public partial class ManualScaleProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfileInternal + { + + /// Backing field for property. + private int? _count; + + /// Number of nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? Count { get => this._count; set => this._count = value; } + + /// Backing field for property. + private string _size; + + /// + /// VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' or 'Standard_D16s_v5'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Size { get => this._size; set => this._size = value; } + + /// Creates an new instance. + public ManualScaleProfile() + { + + } + } + /// Specifications on number of machines. + public partial interface IManualScaleProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Number of nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Number of nodes.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? Count { get; set; } + /// + /// VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' or 'Standard_D16s_v5'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' or 'Standard_D16s_v5'.", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + string Size { get; set; } + + } + /// Specifications on number of machines. + internal partial interface IManualScaleProfileInternal + + { + /// Number of nodes. + int? Count { get; set; } + /// + /// VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' or 'Standard_D16s_v5'. + /// + string Size { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ManualScaleProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ManualScaleProfile.json.cs new file mode 100644 index 000000000000..ebe8f31444f9 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ManualScaleProfile.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Specifications on number of machines. + public partial class ManualScaleProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManualScaleProfile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ManualScaleProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_size = If( json?.PropertyT("size"), out var __jsonSize) ? (string)__jsonSize : (string)_size;} + {_count = If( json?.PropertyT("count"), out var __jsonCount) ? (int?)__jsonCount : _count;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._size)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._size.ToString()) : null, "size" ,container.Add ); + AddIf( null != this._count ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._count) : null, "count" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevision.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevision.PowerShell.cs new file mode 100644 index 000000000000..6c89beaa25dd --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevision.PowerShell.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// Holds information on upgrades and compatibility for given major.minor mesh release. + /// + [System.ComponentModel.TypeConverter(typeof(MeshRevisionTypeConverter))] + public partial class MeshRevision + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevision DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MeshRevision(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevision DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MeshRevision(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevision FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MeshRevision(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Revision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Revision = (string) content.GetValueForProperty("Revision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Revision, global::System.Convert.ToString); + } + if (content.Contains("Upgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Upgrade = (System.Collections.Generic.List) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompatibleWith")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).CompatibleWith = (System.Collections.Generic.List) content.GetValueForProperty("CompatibleWith",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).CompatibleWith, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CompatibleVersionsTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MeshRevision(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Revision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Revision = (string) content.GetValueForProperty("Revision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Revision, global::System.Convert.ToString); + } + if (content.Contains("Upgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Upgrade = (System.Collections.Generic.List) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompatibleWith")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).CompatibleWith = (System.Collections.Generic.List) content.GetValueForProperty("CompatibleWith",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).CompatibleWith, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CompatibleVersionsTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Holds information on upgrades and compatibility for given major.minor mesh release. + [System.ComponentModel.TypeConverter(typeof(MeshRevisionTypeConverter))] + public partial interface IMeshRevision + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevision.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevision.TypeConverter.cs new file mode 100644 index 000000000000..428ef9525e79 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevision.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MeshRevisionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevision ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevision).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MeshRevision.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MeshRevision.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MeshRevision.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevision.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevision.cs new file mode 100644 index 000000000000..0de16f1c1f93 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevision.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Holds information on upgrades and compatibility for given major.minor mesh release. + /// + public partial class MeshRevision : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevision, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _compatibleWith; + + /// + /// List of items this revision of service mesh is compatible with, and their associated versions. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List CompatibleWith { get => this._compatibleWith; set => this._compatibleWith = value; } + + /// Backing field for property. + private string _revision; + + /// The revision of the mesh release. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Revision { get => this._revision; set => this._revision = value; } + + /// Backing field for property. + private System.Collections.Generic.List _upgrade; + + /// List of revisions available for upgrade of a specific mesh revision + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Upgrade { get => this._upgrade; set => this._upgrade = value; } + + /// Creates an new instance. + public MeshRevision() + { + + } + } + /// Holds information on upgrades and compatibility for given major.minor mesh release. + public partial interface IMeshRevision : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// List of items this revision of service mesh is compatible with, and their associated versions. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"List of items this revision of service mesh is compatible with, and their associated versions.", + SerializedName = @"compatibleWith", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersions) })] + System.Collections.Generic.List CompatibleWith { get; set; } + /// The revision of the mesh release. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The revision of the mesh release.", + SerializedName = @"revision", + PossibleTypes = new [] { typeof(string) })] + string Revision { get; set; } + /// List of revisions available for upgrade of a specific mesh revision + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"List of revisions available for upgrade of a specific mesh revision", + SerializedName = @"upgrades", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List Upgrade { get; set; } + + } + /// Holds information on upgrades and compatibility for given major.minor mesh release. + internal partial interface IMeshRevisionInternal + + { + /// + /// List of items this revision of service mesh is compatible with, and their associated versions. + /// + System.Collections.Generic.List CompatibleWith { get; set; } + /// The revision of the mesh release. + string Revision { get; set; } + /// List of revisions available for upgrade of a specific mesh revision + System.Collections.Generic.List Upgrade { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevision.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevision.json.cs new file mode 100644 index 000000000000..32fd99130ae4 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevision.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Holds information on upgrades and compatibility for given major.minor mesh release. + /// + public partial class MeshRevision + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevision. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevision. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevision FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MeshRevision(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal MeshRevision(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_revision = If( json?.PropertyT("revision"), out var __jsonRevision) ? (string)__jsonRevision : (string)_revision;} + {_upgrade = If( json?.PropertyT("upgrades"), out var __jsonUpgrades) ? If( __jsonUpgrades as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _upgrade;} + {_compatibleWith = If( json?.PropertyT("compatibleWith"), out var __jsonCompatibleWith) ? If( __jsonCompatibleWith as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersions) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CompatibleVersions.FromJson(__p) )) ))() : null : _compatibleWith;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._revision)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._revision.ToString()) : null, "revision" ,container.Add ); + if (null != this._upgrade) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._upgrade ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("upgrades",__w); + } + if (null != this._compatibleWith) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __s in this._compatibleWith ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("compatibleWith",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfile.PowerShell.cs new file mode 100644 index 000000000000..6f3cc9fa78c6 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfile.PowerShell.cs @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Mesh revision profile for a mesh. + [System.ComponentModel.TypeConverter(typeof(MeshRevisionProfileTypeConverter))] + public partial class MeshRevisionProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MeshRevisionProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MeshRevisionProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MeshRevisionProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfilePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("MeshRevision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileInternal)this).MeshRevision = (System.Collections.Generic.List) content.GetValueForProperty("MeshRevision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileInternal)this).MeshRevision, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MeshRevisionProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfilePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("MeshRevision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileInternal)this).MeshRevision = (System.Collections.Generic.List) content.GetValueForProperty("MeshRevision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileInternal)this).MeshRevision, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Mesh revision profile for a mesh. + [System.ComponentModel.TypeConverter(typeof(MeshRevisionProfileTypeConverter))] + public partial interface IMeshRevisionProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfile.TypeConverter.cs new file mode 100644 index 000000000000..54f284f87e68 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MeshRevisionProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MeshRevisionProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MeshRevisionProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MeshRevisionProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfile.cs new file mode 100644 index 000000000000..e137db75340c --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfile.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Mesh revision profile for a mesh. + public partial class MeshRevisionProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ProxyResource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Id; } + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MeshRevision { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfilePropertiesInternal)Property).MeshRevision; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfilePropertiesInternal)Property).MeshRevision = value ?? null /* arrayOf */; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfileProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties _property; + + /// Mesh revision profile properties for a mesh + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfileProperties()); set => this._property = value; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public MeshRevisionProfile() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// Mesh revision profile for a mesh. + public partial interface IMeshRevisionProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResource + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"meshRevisions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevision) })] + System.Collections.Generic.List MeshRevision { get; set; } + + } + /// Mesh revision profile for a mesh. + internal partial interface IMeshRevisionProfileInternal : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResourceInternal + { + System.Collections.Generic.List MeshRevision { get; set; } + /// Mesh revision profile properties for a mesh + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfile.json.cs new file mode 100644 index 000000000000..e41f336b6e89 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfile.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Mesh revision profile for a mesh. + public partial class MeshRevisionProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MeshRevisionProfile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal MeshRevisionProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfileProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileList.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileList.PowerShell.cs new file mode 100644 index 000000000000..0a5d72241aac --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileList.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Holds an array of MeshRevisionsProfiles + [System.ComponentModel.TypeConverter(typeof(MeshRevisionProfileListTypeConverter))] + public partial class MeshRevisionProfileList + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileList DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MeshRevisionProfileList(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MeshRevisionProfileList(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MeshRevisionProfileList(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileListInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MeshRevisionProfileList(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileListInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Holds an array of MeshRevisionsProfiles + [System.ComponentModel.TypeConverter(typeof(MeshRevisionProfileListTypeConverter))] + public partial interface IMeshRevisionProfileList + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileList.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileList.TypeConverter.cs new file mode 100644 index 000000000000..fb368956dd9f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileList.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MeshRevisionProfileListTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileList ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileList).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MeshRevisionProfileList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MeshRevisionProfileList.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MeshRevisionProfileList.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileList.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileList.cs new file mode 100644 index 000000000000..bae956f25b97 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileList.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Holds an array of MeshRevisionsProfiles + public partial class MeshRevisionProfileList : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileList, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileListInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The URL to get the next set of mesh revision profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// Array of service mesh add-on revision profiles for all supported mesh modes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public MeshRevisionProfileList() + { + + } + } + /// Holds an array of MeshRevisionsProfiles + public partial interface IMeshRevisionProfileList : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The URL to get the next set of mesh revision profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL to get the next set of mesh revision profile.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// Array of service mesh add-on revision profiles for all supported mesh modes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Array of service mesh add-on revision profiles for all supported mesh modes.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile) })] + System.Collections.Generic.List Value { get; set; } + + } + /// Holds an array of MeshRevisionsProfiles + internal partial interface IMeshRevisionProfileListInternal + + { + /// The URL to get the next set of mesh revision profile. + string NextLink { get; set; } + /// Array of service mesh add-on revision profiles for all supported mesh modes. + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileList.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileList.json.cs new file mode 100644 index 000000000000..fcc9461ec3f9 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileList.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Holds an array of MeshRevisionsProfiles + public partial class MeshRevisionProfileList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MeshRevisionProfileList(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal MeshRevisionProfileList(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionProfile.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileProperties.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileProperties.PowerShell.cs new file mode 100644 index 000000000000..f52f5002b0fb --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileProperties.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Mesh revision profile properties for a mesh + [System.ComponentModel.TypeConverter(typeof(MeshRevisionProfilePropertiesTypeConverter))] + public partial class MeshRevisionProfileProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MeshRevisionProfileProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MeshRevisionProfileProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MeshRevisionProfileProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MeshRevision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfilePropertiesInternal)this).MeshRevision = (System.Collections.Generic.List) content.GetValueForProperty("MeshRevision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfilePropertiesInternal)this).MeshRevision, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MeshRevisionProfileProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MeshRevision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfilePropertiesInternal)this).MeshRevision = (System.Collections.Generic.List) content.GetValueForProperty("MeshRevision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfilePropertiesInternal)this).MeshRevision, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevisionTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Mesh revision profile properties for a mesh + [System.ComponentModel.TypeConverter(typeof(MeshRevisionProfilePropertiesTypeConverter))] + public partial interface IMeshRevisionProfileProperties + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileProperties.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileProperties.TypeConverter.cs new file mode 100644 index 000000000000..e12d83d6eaa5 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MeshRevisionProfilePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MeshRevisionProfileProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MeshRevisionProfileProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MeshRevisionProfileProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileProperties.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileProperties.cs new file mode 100644 index 000000000000..e68693ce9f13 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileProperties.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Mesh revision profile properties for a mesh + public partial class MeshRevisionProfileProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfilePropertiesInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _meshRevision; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List MeshRevision { get => this._meshRevision; set => this._meshRevision = value; } + + /// Creates an new instance. + public MeshRevisionProfileProperties() + { + + } + } + /// Mesh revision profile properties for a mesh + public partial interface IMeshRevisionProfileProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"meshRevisions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevision) })] + System.Collections.Generic.List MeshRevision { get; set; } + + } + /// Mesh revision profile properties for a mesh + internal partial interface IMeshRevisionProfilePropertiesInternal + + { + System.Collections.Generic.List MeshRevision { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileProperties.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileProperties.json.cs new file mode 100644 index 000000000000..3bbdc3846f1b --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshRevisionProfileProperties.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Mesh revision profile properties for a mesh + public partial class MeshRevisionProfileProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MeshRevisionProfileProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal MeshRevisionProfileProperties(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_meshRevision = If( json?.PropertyT("meshRevisions"), out var __jsonMeshRevisions) ? If( __jsonMeshRevisions as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevision) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevision.FromJson(__u) )) ))() : null : _meshRevision;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._meshRevision) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._meshRevision ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("meshRevisions",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfile.PowerShell.cs new file mode 100644 index 000000000000..335a93a8835c --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfile.PowerShell.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Upgrade profile for given mesh. + [System.ComponentModel.TypeConverter(typeof(MeshUpgradeProfileTypeConverter))] + public partial class MeshUpgradeProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MeshUpgradeProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MeshUpgradeProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MeshUpgradeProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfilePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Revision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).Revision = (string) content.GetValueForProperty("Revision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).Revision, global::System.Convert.ToString); + } + if (content.Contains("Upgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).Upgrade = (System.Collections.Generic.List) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompatibleWith")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).CompatibleWith = (System.Collections.Generic.List) content.GetValueForProperty("CompatibleWith",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).CompatibleWith, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CompatibleVersionsTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MeshUpgradeProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfilePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Revision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).Revision = (string) content.GetValueForProperty("Revision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).Revision, global::System.Convert.ToString); + } + if (content.Contains("Upgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).Upgrade = (System.Collections.Generic.List) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompatibleWith")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).CompatibleWith = (System.Collections.Generic.List) content.GetValueForProperty("CompatibleWith",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal)this).CompatibleWith, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CompatibleVersionsTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Upgrade profile for given mesh. + [System.ComponentModel.TypeConverter(typeof(MeshUpgradeProfileTypeConverter))] + public partial interface IMeshUpgradeProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfile.TypeConverter.cs new file mode 100644 index 000000000000..e2b4a3728e2e --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MeshUpgradeProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MeshUpgradeProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MeshUpgradeProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MeshUpgradeProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfile.cs new file mode 100644 index 000000000000..f43713a22417 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfile.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Upgrade profile for given mesh. + public partial class MeshUpgradeProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ProxyResource(); + + /// + /// List of items this revision of service mesh is compatible with, and their associated versions. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List CompatibleWith { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)Property).CompatibleWith; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)Property).CompatibleWith = value ?? null /* arrayOf */; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfileProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties _property; + + /// Mesh upgrade profile properties for a major.minor release. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfileProperties()); set => this._property = value; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// The revision of the mesh release. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string Revision { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)Property).Revision; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)Property).Revision = value ?? null; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__proxyResource).Type; } + + /// List of revisions available for upgrade of a specific mesh revision + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Upgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)Property).Upgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)Property).Upgrade = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public MeshUpgradeProfile() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// Upgrade profile for given mesh. + public partial interface IMeshUpgradeProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResource + { + /// + /// List of items this revision of service mesh is compatible with, and their associated versions. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"List of items this revision of service mesh is compatible with, and their associated versions.", + SerializedName = @"compatibleWith", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICompatibleVersions) })] + System.Collections.Generic.List CompatibleWith { get; set; } + /// The revision of the mesh release. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The revision of the mesh release.", + SerializedName = @"revision", + PossibleTypes = new [] { typeof(string) })] + string Revision { get; set; } + /// List of revisions available for upgrade of a specific mesh revision + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"List of revisions available for upgrade of a specific mesh revision", + SerializedName = @"upgrades", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List Upgrade { get; set; } + + } + /// Upgrade profile for given mesh. + internal partial interface IMeshUpgradeProfileInternal : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResourceInternal + { + /// + /// List of items this revision of service mesh is compatible with, and their associated versions. + /// + System.Collections.Generic.List CompatibleWith { get; set; } + /// Mesh upgrade profile properties for a major.minor release. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties Property { get; set; } + /// The revision of the mesh release. + string Revision { get; set; } + /// List of revisions available for upgrade of a specific mesh revision + System.Collections.Generic.List Upgrade { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfile.json.cs new file mode 100644 index 000000000000..5f59e1aa1e74 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfile.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Upgrade profile for given mesh. + public partial class MeshUpgradeProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MeshUpgradeProfile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal MeshUpgradeProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfileProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileList.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileList.PowerShell.cs new file mode 100644 index 000000000000..111bb4a49a4b --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileList.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Holds an array of MeshUpgradeProfiles + [System.ComponentModel.TypeConverter(typeof(MeshUpgradeProfileListTypeConverter))] + public partial class MeshUpgradeProfileList + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileList DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MeshUpgradeProfileList(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MeshUpgradeProfileList(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MeshUpgradeProfileList(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileListInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MeshUpgradeProfileList(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileListInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Holds an array of MeshUpgradeProfiles + [System.ComponentModel.TypeConverter(typeof(MeshUpgradeProfileListTypeConverter))] + public partial interface IMeshUpgradeProfileList + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileList.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileList.TypeConverter.cs new file mode 100644 index 000000000000..683e3e1728b8 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileList.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MeshUpgradeProfileListTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileList ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileList).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MeshUpgradeProfileList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MeshUpgradeProfileList.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MeshUpgradeProfileList.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileList.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileList.cs new file mode 100644 index 000000000000..216ea16fed45 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileList.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Holds an array of MeshUpgradeProfiles + public partial class MeshUpgradeProfileList : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileList, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileListInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The URL to get the next set of mesh upgrade profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// Array of supported service mesh add-on upgrade profiles. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public MeshUpgradeProfileList() + { + + } + } + /// Holds an array of MeshUpgradeProfiles + public partial interface IMeshUpgradeProfileList : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The URL to get the next set of mesh upgrade profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL to get the next set of mesh upgrade profile.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// Array of supported service mesh add-on upgrade profiles. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Array of supported service mesh add-on upgrade profiles.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile) })] + System.Collections.Generic.List Value { get; set; } + + } + /// Holds an array of MeshUpgradeProfiles + internal partial interface IMeshUpgradeProfileListInternal + + { + /// The URL to get the next set of mesh upgrade profile. + string NextLink { get; set; } + /// Array of supported service mesh add-on upgrade profiles. + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileList.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileList.json.cs new file mode 100644 index 000000000000..92a5541596c2 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileList.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Holds an array of MeshUpgradeProfiles + public partial class MeshUpgradeProfileList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MeshUpgradeProfileList(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal MeshUpgradeProfileList(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshUpgradeProfile.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileProperties.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileProperties.PowerShell.cs new file mode 100644 index 000000000000..df45ea5b1800 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileProperties.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Mesh upgrade profile properties for a major.minor release. + [System.ComponentModel.TypeConverter(typeof(MeshUpgradeProfilePropertiesTypeConverter))] + public partial class MeshUpgradeProfileProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MeshUpgradeProfileProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MeshUpgradeProfileProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MeshUpgradeProfileProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Revision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Revision = (string) content.GetValueForProperty("Revision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Revision, global::System.Convert.ToString); + } + if (content.Contains("Upgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Upgrade = (System.Collections.Generic.List) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompatibleWith")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).CompatibleWith = (System.Collections.Generic.List) content.GetValueForProperty("CompatibleWith",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).CompatibleWith, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CompatibleVersionsTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MeshUpgradeProfileProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Revision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Revision = (string) content.GetValueForProperty("Revision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Revision, global::System.Convert.ToString); + } + if (content.Contains("Upgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Upgrade = (System.Collections.Generic.List) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompatibleWith")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).CompatibleWith = (System.Collections.Generic.List) content.GetValueForProperty("CompatibleWith",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)this).CompatibleWith, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CompatibleVersionsTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Mesh upgrade profile properties for a major.minor release. + [System.ComponentModel.TypeConverter(typeof(MeshUpgradeProfilePropertiesTypeConverter))] + public partial interface IMeshUpgradeProfileProperties + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileProperties.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileProperties.TypeConverter.cs new file mode 100644 index 000000000000..2bd8962407e2 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MeshUpgradeProfilePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MeshUpgradeProfileProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MeshUpgradeProfileProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MeshUpgradeProfileProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileProperties.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileProperties.cs new file mode 100644 index 000000000000..5242de9fdf6a --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileProperties.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Mesh upgrade profile properties for a major.minor release. + public partial class MeshUpgradeProfileProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfilePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevision __meshRevision = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevision(); + + /// + /// List of items this revision of service mesh is compatible with, and their associated versions. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public System.Collections.Generic.List CompatibleWith { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)__meshRevision).CompatibleWith; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)__meshRevision).CompatibleWith = value ?? null /* arrayOf */; } + + /// The revision of the mesh release. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Revision { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)__meshRevision).Revision; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)__meshRevision).Revision = value ?? null; } + + /// List of revisions available for upgrade of a specific mesh revision + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public System.Collections.Generic.List Upgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)__meshRevision).Upgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal)__meshRevision).Upgrade = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public MeshUpgradeProfileProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__meshRevision), __meshRevision); + await eventListener.AssertObjectIsValid(nameof(__meshRevision), __meshRevision); + } + } + /// Mesh upgrade profile properties for a major.minor release. + public partial interface IMeshUpgradeProfileProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevision + { + + } + /// Mesh upgrade profile properties for a major.minor release. + internal partial interface IMeshUpgradeProfilePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionInternal + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileProperties.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileProperties.json.cs new file mode 100644 index 000000000000..ef634aacc469 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/MeshUpgradeProfileProperties.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Mesh upgrade profile properties for a major.minor release. + public partial class MeshUpgradeProfileProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MeshUpgradeProfileProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal MeshUpgradeProfileProperties(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __meshRevision = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MeshRevision(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __meshRevision?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProfile.cs deleted file mode 100644 index aefb7d064288..000000000000 --- a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProfile.cs +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// The OS option profile. - public partial class OSOptionProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal - { - - /// Backing field for property. - private string _id; - - /// The ID of the OS option resource. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string Id { get => this._id; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal.Id { get => this._id; set { {_id = value;} } } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal.Name { get => this._name; set { {_name = value;} } } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionPropertyList()); set { {_property = value;} } } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfileInternal.Type { get => this._type; set { {_type = value;} } } - - /// Backing field for property. - private string _name; - - /// The name of the OS option resource. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// The list of OS options. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public System.Collections.Generic.List OSOptionPropertyList { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyListInternal)Property).OSOptionPropertyList1; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyListInternal)Property).OSOptionPropertyList1 = value ; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList _property; - - /// The list of OS options. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OSOptionPropertyList()); set => this._property = value; } - - /// Gets the resource group name - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } - - /// Backing field for property. - private string _type; - - /// The type of the OS option resource. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string Type { get => this._type; } - - /// Creates an new instance. - public OSOptionProfile() - { - - } - } - /// The OS option profile. - public partial interface IOSOptionProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// The ID of the OS option resource. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Read = true, - Create = false, - Update = false, - Description = @"The ID of the OS option resource.", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string Id { get; } - /// The name of the OS option resource. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Read = true, - Create = false, - Update = false, - Description = @"The name of the OS option resource.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// The list of OS options. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = true, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"The list of OS options.", - SerializedName = @"osOptionPropertyList", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty) })] - System.Collections.Generic.List OSOptionPropertyList { get; set; } - /// The type of the OS option resource. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Read = true, - Create = false, - Update = false, - Description = @"The type of the OS option resource.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string Type { get; } - - } - /// The OS option profile. - internal partial interface IOSOptionProfileInternal - - { - /// The ID of the OS option resource. - string Id { get; set; } - /// The name of the OS option resource. - string Name { get; set; } - /// The list of OS options. - System.Collections.Generic.List OSOptionPropertyList { get; set; } - /// The list of OS options. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList Property { get; set; } - /// The type of the OS option resource. - string Type { get; set; } - - } -} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProperty.cs b/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProperty.cs deleted file mode 100644 index 2a1681e90a70..000000000000 --- a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionProperty.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// OS option property. - public partial class OSOptionProperty : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyInternal - { - - /// Backing field for property. - private bool _enableFipsImage; - - /// Whether the image is FIPS-enabled. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public bool EnableFipsImage { get => this._enableFipsImage; set => this._enableFipsImage = value; } - - /// Backing field for property. - private string _oSType; - - /// The OS type. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string OSType { get => this._oSType; set => this._oSType = value; } - - /// Creates an new instance. - public OSOptionProperty() - { - - } - } - /// OS option property. - public partial interface IOSOptionProperty : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// Whether the image is FIPS-enabled. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = true, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"Whether the image is FIPS-enabled.", - SerializedName = @"enable-fips-image", - PossibleTypes = new [] { typeof(bool) })] - bool EnableFipsImage { get; set; } - /// The OS type. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = true, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"The OS type.", - SerializedName = @"os-type", - PossibleTypes = new [] { typeof(string) })] - string OSType { get; set; } - - } - /// OS option property. - internal partial interface IOSOptionPropertyInternal - - { - /// Whether the image is FIPS-enabled. - bool EnableFipsImage { get; set; } - /// The OS type. - string OSType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionPropertyList.cs b/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionPropertyList.cs deleted file mode 100644 index 66d5f37ead76..000000000000 --- a/generated/Aks/Aks.Autorest/generated/api/Models/OSOptionPropertyList.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// The list of OS option properties. - public partial class OSOptionPropertyList : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyList, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionPropertyListInternal - { - - /// Backing field for property. - private System.Collections.Generic.List _oSOptionPropertyList1; - - /// The list of OS options. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public System.Collections.Generic.List OSOptionPropertyList1 { get => this._oSOptionPropertyList1; set => this._oSOptionPropertyList1 = value; } - - /// Creates an new instance. - public OSOptionPropertyList() - { - - } - } - /// The list of OS option properties. - public partial interface IOSOptionPropertyList : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// The list of OS options. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = true, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"The list of OS options.", - SerializedName = @"osOptionPropertyList", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty) })] - System.Collections.Generic.List OSOptionPropertyList1 { get; set; } - - } - /// The list of OS option properties. - internal partial interface IOSOptionPropertyListInternal - - { - /// The list of OS options. - System.Collections.Generic.List OSOptionPropertyList1 { get; set; } - - } -} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/OperationValue.cs b/generated/Aks/Aks.Autorest/generated/api/Models/OperationValue.cs index 24ececc36993..2679c7bda59e 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/OperationValue.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/OperationValue.cs @@ -40,16 +40,16 @@ public partial class OperationValue : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplay Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.OperationValueDisplay()); set { {_display = value;} } } /// Internal Acessors for DisplayDescription - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Description = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Description = value ?? null; } /// Internal Acessors for DisplayOperation - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Operation = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Operation = value ?? null; } /// Internal Acessors for DisplayProvider - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Provider = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Provider = value ?? null; } /// Internal Acessors for DisplayResource - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Resource = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueDisplayInternal)Display).Resource = value ?? null; } /// Internal Acessors for Name string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValueInternal.Name { get => this._name; set { {_name = value;} } } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/PortRange.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/PortRange.PowerShell.cs new file mode 100644 index 000000000000..97408f57acf8 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/PortRange.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The port range. + [System.ComponentModel.TypeConverter(typeof(PortRangeTypeConverter))] + public partial class PortRange + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRange DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PortRange(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRange DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PortRange(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRange FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PortRange(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PortStart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRangeInternal)this).PortStart = (int?) content.GetValueForProperty("PortStart",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRangeInternal)this).PortStart, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PortEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRangeInternal)this).PortEnd = (int?) content.GetValueForProperty("PortEnd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRangeInternal)this).PortEnd, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Protocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRangeInternal)this).Protocol = (string) content.GetValueForProperty("Protocol",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRangeInternal)this).Protocol, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PortRange(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PortStart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRangeInternal)this).PortStart = (int?) content.GetValueForProperty("PortStart",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRangeInternal)this).PortStart, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PortEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRangeInternal)this).PortEnd = (int?) content.GetValueForProperty("PortEnd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRangeInternal)this).PortEnd, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Protocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRangeInternal)this).Protocol = (string) content.GetValueForProperty("Protocol",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRangeInternal)this).Protocol, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The port range. + [System.ComponentModel.TypeConverter(typeof(PortRangeTypeConverter))] + public partial interface IPortRange + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/PortRange.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/PortRange.TypeConverter.cs new file mode 100644 index 000000000000..8431e9c5d0e2 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/PortRange.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PortRangeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRange ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRange).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PortRange.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PortRange.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PortRange.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/PortRange.cs b/generated/Aks/Aks.Autorest/generated/api/Models/PortRange.cs new file mode 100644 index 000000000000..2c82e9041f8f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/PortRange.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The port range. + public partial class PortRange : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRange, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRangeInternal + { + + /// Backing field for property. + private int? _portEnd; + + /// + /// The maximum port that is included in the range. It should be ranged from 1 to 65535, and be greater than or equal to portStart. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? PortEnd { get => this._portEnd; set => this._portEnd = value; } + + /// Backing field for property. + private int? _portStart; + + /// + /// The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to portEnd. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? PortStart { get => this._portStart; set => this._portStart = value; } + + /// Backing field for property. + private string _protocol; + + /// The network protocol of the port. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Protocol { get => this._protocol; set => this._protocol = value; } + + /// Creates an new instance. + public PortRange() + { + + } + } + /// The port range. + public partial interface IPortRange : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// The maximum port that is included in the range. It should be ranged from 1 to 65535, and be greater than or equal to portStart. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum port that is included in the range. It should be ranged from 1 to 65535, and be greater than or equal to portStart.", + SerializedName = @"portEnd", + PossibleTypes = new [] { typeof(int) })] + int? PortEnd { get; set; } + /// + /// The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to portEnd. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to portEnd.", + SerializedName = @"portStart", + PossibleTypes = new [] { typeof(int) })] + int? PortStart { get; set; } + /// The network protocol of the port. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The network protocol of the port.", + SerializedName = @"protocol", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("TCP", "UDP")] + string Protocol { get; set; } + + } + /// The port range. + internal partial interface IPortRangeInternal + + { + /// + /// The maximum port that is included in the range. It should be ranged from 1 to 65535, and be greater than or equal to portStart. + /// + int? PortEnd { get; set; } + /// + /// The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to portEnd. + /// + int? PortStart { get; set; } + /// The network protocol of the port. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("TCP", "UDP")] + string Protocol { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/PortRange.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/PortRange.json.cs new file mode 100644 index 000000000000..171d49dcd5f8 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/PortRange.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The port range. + public partial class PortRange + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRange. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRange. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPortRange FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new PortRange(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal PortRange(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_portStart = If( json?.PropertyT("portStart"), out var __jsonPortStart) ? (int?)__jsonPortStart : _portStart;} + {_portEnd = If( json?.PropertyT("portEnd"), out var __jsonPortEnd) ? (int?)__jsonPortEnd : _portEnd;} + {_protocol = If( json?.PropertyT("protocol"), out var __jsonProtocol) ? (string)__jsonProtocol : (string)_protocol;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._portStart ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._portStart) : null, "portStart" ,container.Add ); + AddIf( null != this._portEnd ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._portEnd) : null, "portEnd" ,container.Add ); + AddIf( null != (((object)this._protocol)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._protocol.ToString()) : null, "protocol" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/PrivateEndpointConnection.cs b/generated/Aks/Aks.Autorest/generated/api/Models/PrivateEndpointConnection.cs index c03fb5c21eae..8dc969c8cf0e 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/PrivateEndpointConnection.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/PrivateEndpointConnection.cs @@ -27,16 +27,16 @@ public partial class PrivateEndpointConnection : string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for PrivateEndpoint - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint = value ?? null /* model class */; } /// Internal Acessors for PrivateLinkServiceConnectionState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkServiceConnectionState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionInternal.PrivateLinkServiceConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateLinkServiceConnectionState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionInternal.PrivateLinkServiceConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState = value ?? null /* model class */; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.PrivateEndpointConnectionProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState = value ?? null; } /// Internal Acessors for Type string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IPrivateEndpointConnectionInternal.Type { get => this._type; set { {_type = value;} } } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ProxyResource.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ProxyResource.PowerShell.cs new file mode 100644 index 000000000000..c8c06185f4d1 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ProxyResource.PowerShell.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial class ProxyResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProxyResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProxyResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProxyResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProxyResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial interface IProxyResource + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs new file mode 100644 index 000000000000..ec45d0b6c8fa --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProxyResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProxyResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ProxyResource.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ProxyResource.cs new file mode 100644 index 000000000000..a477b91991ae --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ProxyResource.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProxyResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + public partial interface IProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResource + { + + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + internal partial interface IProxyResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ProxyResource.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ProxyResource.json.cs new file mode 100644 index 000000000000..cf557c5a9c8f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ProxyResource.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResource. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResource. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Resource(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/RelativeMonthlySchedule.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/RelativeMonthlySchedule.PowerShell.cs new file mode 100644 index 000000000000..be3bf9baa0a0 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/RelativeMonthlySchedule.PowerShell.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + /// + [System.ComponentModel.TypeConverter(typeof(RelativeMonthlyScheduleTypeConverter))] + public partial class RelativeMonthlySchedule + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RelativeMonthlySchedule(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RelativeMonthlySchedule(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RelativeMonthlySchedule(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)this).IntervalMonth = (int) content.GetValueForProperty("IntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)this).IntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeekIndex")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)this).WeekIndex = (string) content.GetValueForProperty("WeekIndex",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)this).WeekIndex, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)this).DayOfWeek = (string) content.GetValueForProperty("DayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)this).DayOfWeek, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RelativeMonthlySchedule(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)this).IntervalMonth = (int) content.GetValueForProperty("IntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)this).IntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeekIndex")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)this).WeekIndex = (string) content.GetValueForProperty("WeekIndex",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)this).WeekIndex, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)this).DayOfWeek = (string) content.GetValueForProperty("DayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)this).DayOfWeek, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + [System.ComponentModel.TypeConverter(typeof(RelativeMonthlyScheduleTypeConverter))] + public partial interface IRelativeMonthlySchedule + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/RelativeMonthlySchedule.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/RelativeMonthlySchedule.TypeConverter.cs new file mode 100644 index 000000000000..02a38a461a7c --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/RelativeMonthlySchedule.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RelativeMonthlyScheduleTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RelativeMonthlySchedule.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RelativeMonthlySchedule.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RelativeMonthlySchedule.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/RelativeMonthlySchedule.cs b/generated/Aks/Aks.Autorest/generated/api/Models/RelativeMonthlySchedule.cs new file mode 100644 index 000000000000..9897dfaa0f47 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/RelativeMonthlySchedule.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + /// + public partial class RelativeMonthlySchedule : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal + { + + /// Backing field for property. + private string _dayOfWeek; + + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string DayOfWeek { get => this._dayOfWeek; set => this._dayOfWeek = value; } + + /// Backing field for property. + private int _intervalMonth; + + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int IntervalMonth { get => this._intervalMonth; set => this._intervalMonth = value; } + + /// Backing field for property. + private string _weekIndex; + + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string WeekIndex { get => this._weekIndex; set => this._weekIndex = value; } + + /// Creates an new instance. + public RelativeMonthlySchedule() + { + + } + } + /// For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + public partial interface IRelativeMonthlySchedule : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string DayOfWeek { get; set; } + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + int IntervalMonth { get; set; } + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The week index. Specifies on which week of the month the dayOfWeek applies.", + SerializedName = @"weekIndex", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + string WeekIndex { get; set; } + + } + /// For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + internal partial interface IRelativeMonthlyScheduleInternal + + { + /// Specifies on which day of the week the maintenance occurs. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string DayOfWeek { get; set; } + /// Specifies the number of months between each set of occurrences. + int IntervalMonth { get; set; } + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + string WeekIndex { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/RelativeMonthlySchedule.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/RelativeMonthlySchedule.json.cs new file mode 100644 index 000000000000..964f9e5831fa --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/RelativeMonthlySchedule.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + /// + public partial class RelativeMonthlySchedule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new RelativeMonthlySchedule(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal RelativeMonthlySchedule(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_intervalMonth = If( json?.PropertyT("intervalMonths"), out var __jsonIntervalMonths) ? (int)__jsonIntervalMonths : _intervalMonth;} + {_weekIndex = If( json?.PropertyT("weekIndex"), out var __jsonWeekIndex) ? (string)__jsonWeekIndex : (string)_weekIndex;} + {_dayOfWeek = If( json?.PropertyT("dayOfWeek"), out var __jsonDayOfWeek) ? (string)__jsonDayOfWeek : (string)_dayOfWeek;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber(this._intervalMonth), "intervalMonths" ,container.Add ); + AddIf( null != (((object)this._weekIndex)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._weekIndex.ToString()) : null, "weekIndex" ,container.Add ); + AddIf( null != (((object)this._dayOfWeek)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._dayOfWeek.ToString()) : null, "dayOfWeek" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/Resource.cs b/generated/Aks/Aks.Autorest/generated/api/Models/Resource.cs index 901268b0cb6e..cf80e4edc526 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/Resource.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/Resource.cs @@ -19,7 +19,7 @@ public partial class Resource : private string _id; /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Id { get => this._id; } @@ -34,22 +34,22 @@ public partial class Resource : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for SystemDataCreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// Internal Acessors for SystemDataCreatedBy - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedBy = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// Internal Acessors for SystemDataCreatedByType - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedByType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// Internal Acessors for SystemDataLastModifiedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// Internal Acessors for SystemDataLastModifiedBy - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedBy = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// Internal Acessors for SystemDataLastModifiedByType - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedByType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// Internal Acessors for Type string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Type { get => this._type; set { {_type = value;} } } @@ -114,7 +114,7 @@ public partial interface IResource : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -122,7 +122,7 @@ public partial interface IResource : Read = true, Create = false, Update = false, - Description = @"Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + Description = @"Fully qualified resource ID for the resource. E.g. ""/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}""", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string Id { get; } @@ -225,7 +225,7 @@ internal partial interface IResourceInternal { /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// string Id { get; set; } /// The name of the resource diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/RunCommandResult.cs b/generated/Aks/Aks.Autorest/generated/api/Models/RunCommandResult.cs index c0fc92da9e23..18d90824db9e 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/RunCommandResult.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/RunCommandResult.cs @@ -33,28 +33,28 @@ public partial class RunCommandResult : public string Log { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).Log; } /// Internal Acessors for ExitCode - int? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResultInternal.ExitCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).ExitCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).ExitCode = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResultInternal.ExitCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).ExitCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).ExitCode = value ?? default(int); } /// Internal Acessors for FinishedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResultInternal.FinishedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).FinishedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).FinishedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResultInternal.FinishedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).FinishedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).FinishedAt = value ?? default(global::System.DateTime); } /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResultInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Log - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResultInternal.Log { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).Log; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).Log = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResultInternal.Log { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).Log; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).Log = value ?? null; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResultInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.CommandResultProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResultInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResultInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).ProvisioningState = value ?? null; } /// Internal Acessors for Reason - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResultInternal.Reason { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).Reason; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).Reason = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResultInternal.Reason { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).Reason; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).Reason = value ?? null; } /// Internal Acessors for StartedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResultInternal.StartedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).StartedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).StartedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResultInternal.StartedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).StartedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultPropertiesInternal)Property).StartedAt = value ?? default(global::System.DateTime); } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICommandResultProperties _property; diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ScaleProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ScaleProfile.PowerShell.cs new file mode 100644 index 000000000000..edd7135340d8 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ScaleProfile.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Specifications on how to scale a VirtualMachines agent pool. + [System.ComponentModel.TypeConverter(typeof(ScaleProfileTypeConverter))] + public partial class ScaleProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ScaleProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ScaleProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ScaleProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Manual")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfileInternal)this).Manual = (System.Collections.Generic.List) content.GetValueForProperty("Manual",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfileInternal)this).Manual, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManualScaleProfileTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ScaleProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Manual")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfileInternal)this).Manual = (System.Collections.Generic.List) content.GetValueForProperty("Manual",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfileInternal)this).Manual, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManualScaleProfileTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Specifications on how to scale a VirtualMachines agent pool. + [System.ComponentModel.TypeConverter(typeof(ScaleProfileTypeConverter))] + public partial interface IScaleProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ScaleProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ScaleProfile.TypeConverter.cs new file mode 100644 index 000000000000..41c53e892795 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ScaleProfile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ScaleProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ScaleProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ScaleProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ScaleProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ScaleProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ScaleProfile.cs new file mode 100644 index 000000000000..91583162931e --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ScaleProfile.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Specifications on how to scale a VirtualMachines agent pool. + public partial class ScaleProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfileInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _manual; + + /// Specifications on how to scale the VirtualMachines agent pool to a fixed size. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Manual { get => this._manual; set => this._manual = value; } + + /// Creates an new instance. + public ScaleProfile() + { + + } + } + /// Specifications on how to scale a VirtualMachines agent pool. + public partial interface IScaleProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Specifications on how to scale the VirtualMachines agent pool to a fixed size. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifications on how to scale the VirtualMachines agent pool to a fixed size.", + SerializedName = @"manual", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfile) })] + System.Collections.Generic.List Manual { get; set; } + + } + /// Specifications on how to scale a VirtualMachines agent pool. + internal partial interface IScaleProfileInternal + + { + /// Specifications on how to scale the VirtualMachines agent pool to a fixed size. + System.Collections.Generic.List Manual { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ScaleProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ScaleProfile.json.cs new file mode 100644 index 000000000000..568c2fc8a18c --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ScaleProfile.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Specifications on how to scale a VirtualMachines agent pool. + public partial class ScaleProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ScaleProfile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ScaleProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_manual = If( json?.PropertyT("manual"), out var __jsonManual) ? If( __jsonManual as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfile) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManualScaleProfile.FromJson(__u) )) ))() : null : _manual;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._manual) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._manual ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("manual",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/Schedule.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/Schedule.PowerShell.cs new file mode 100644 index 000000000000..a8c7694c388b --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/Schedule.PowerShell.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', 'absoluteMonthly' or 'relativeMonthly' + /// for your maintenance schedule. + /// + [System.ComponentModel.TypeConverter(typeof(ScheduleTypeConverter))] + public partial class Schedule + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Schedule(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Schedule(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Schedule(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Daily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).Daily = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule) content.GetValueForProperty("Daily",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).Daily, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DailyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("Weekly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).Weekly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule) content.GetValueForProperty("Weekly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).Weekly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.WeeklyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("AbsoluteMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).AbsoluteMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule) content.GetValueForProperty("AbsoluteMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).AbsoluteMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AbsoluteMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("RelativeMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule) content.GetValueForProperty("RelativeMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RelativeMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("DailyIntervalDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).DailyIntervalDay = (int?) content.GetValueForProperty("DailyIntervalDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).DailyIntervalDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyIntervalWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).WeeklyIntervalWeek = (int?) content.GetValueForProperty("WeeklyIntervalWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).WeeklyIntervalWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).WeeklyDayOfWeek = (string) content.GetValueForProperty("WeeklyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).WeeklyDayOfWeek, global::System.Convert.ToString); + } + if (content.Contains("AbsoluteMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).AbsoluteMonthlyIntervalMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).AbsoluteMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AbsoluteMonthlyDayOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).AbsoluteMonthlyDayOfMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyDayOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).AbsoluteMonthlyDayOfMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthlyIntervalMonth = (int?) content.GetValueForProperty("RelativeMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyWeekIndex")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthlyWeekIndex = (string) content.GetValueForProperty("RelativeMonthlyWeekIndex",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthlyWeekIndex, global::System.Convert.ToString); + } + if (content.Contains("RelativeMonthlyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthlyDayOfWeek = (string) content.GetValueForProperty("RelativeMonthlyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthlyDayOfWeek, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Schedule(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Daily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).Daily = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule) content.GetValueForProperty("Daily",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).Daily, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DailyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("Weekly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).Weekly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule) content.GetValueForProperty("Weekly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).Weekly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.WeeklyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("AbsoluteMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).AbsoluteMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule) content.GetValueForProperty("AbsoluteMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).AbsoluteMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AbsoluteMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("RelativeMonthly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthly = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule) content.GetValueForProperty("RelativeMonthly",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthly, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RelativeMonthlyScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("DailyIntervalDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).DailyIntervalDay = (int?) content.GetValueForProperty("DailyIntervalDay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).DailyIntervalDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyIntervalWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).WeeklyIntervalWeek = (int?) content.GetValueForProperty("WeeklyIntervalWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).WeeklyIntervalWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WeeklyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).WeeklyDayOfWeek = (string) content.GetValueForProperty("WeeklyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).WeeklyDayOfWeek, global::System.Convert.ToString); + } + if (content.Contains("AbsoluteMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).AbsoluteMonthlyIntervalMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).AbsoluteMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AbsoluteMonthlyDayOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).AbsoluteMonthlyDayOfMonth = (int?) content.GetValueForProperty("AbsoluteMonthlyDayOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).AbsoluteMonthlyDayOfMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyIntervalMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthlyIntervalMonth = (int?) content.GetValueForProperty("RelativeMonthlyIntervalMonth",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthlyIntervalMonth, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RelativeMonthlyWeekIndex")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthlyWeekIndex = (string) content.GetValueForProperty("RelativeMonthlyWeekIndex",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthlyWeekIndex, global::System.Convert.ToString); + } + if (content.Contains("RelativeMonthlyDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthlyDayOfWeek = (string) content.GetValueForProperty("RelativeMonthlyDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal)this).RelativeMonthlyDayOfWeek, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', 'absoluteMonthly' or 'relativeMonthly' + /// for your maintenance schedule. + [System.ComponentModel.TypeConverter(typeof(ScheduleTypeConverter))] + public partial interface ISchedule + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/Schedule.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/Schedule.TypeConverter.cs new file mode 100644 index 000000000000..a7c6a4116cef --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/Schedule.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ScheduleTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Schedule.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Schedule.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Schedule.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/Schedule.cs b/generated/Aks/Aks.Autorest/generated/api/Models/Schedule.cs new file mode 100644 index 000000000000..bbf87fa5bd6a --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/Schedule.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', 'absoluteMonthly' or 'relativeMonthly' + /// for your maintenance schedule. + /// + public partial class Schedule : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule _absoluteMonthly; + + /// + /// For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule AbsoluteMonthly { get => (this._absoluteMonthly = this._absoluteMonthly ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AbsoluteMonthlySchedule()); set => this._absoluteMonthly = value; } + + /// The date of the month. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? AbsoluteMonthlyDayOfMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlyScheduleInternal)AbsoluteMonthly).DayOfMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlyScheduleInternal)AbsoluteMonthly).DayOfMonth = value ?? default(int); } + + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? AbsoluteMonthlyIntervalMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlyScheduleInternal)AbsoluteMonthly).IntervalMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlyScheduleInternal)AbsoluteMonthly).IntervalMonth = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule _daily; + + /// For schedules like: 'recur every day' or 'recur every 3 days'. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule Daily { get => (this._daily = this._daily ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DailySchedule()); set => this._daily = value; } + + /// Specifies the number of days between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? DailyIntervalDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailyScheduleInternal)Daily).IntervalDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailyScheduleInternal)Daily).IntervalDay = value ?? default(int); } + + /// Internal Acessors for AbsoluteMonthly + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal.AbsoluteMonthly { get => (this._absoluteMonthly = this._absoluteMonthly ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AbsoluteMonthlySchedule()); set { {_absoluteMonthly = value;} } } + + /// Internal Acessors for Daily + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal.Daily { get => (this._daily = this._daily ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DailySchedule()); set { {_daily = value;} } } + + /// Internal Acessors for RelativeMonthly + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal.RelativeMonthly { get => (this._relativeMonthly = this._relativeMonthly ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RelativeMonthlySchedule()); set { {_relativeMonthly = value;} } } + + /// Internal Acessors for Weekly + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScheduleInternal.Weekly { get => (this._weekly = this._weekly ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.WeeklySchedule()); set { {_weekly = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule _relativeMonthly; + + /// + /// For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule RelativeMonthly { get => (this._relativeMonthly = this._relativeMonthly ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RelativeMonthlySchedule()); set => this._relativeMonthly = value; } + + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string RelativeMonthlyDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)RelativeMonthly).DayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)RelativeMonthly).DayOfWeek = value ?? null; } + + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? RelativeMonthlyIntervalMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)RelativeMonthly).IntervalMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)RelativeMonthly).IntervalMonth = value ?? default(int); } + + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string RelativeMonthlyWeekIndex { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)RelativeMonthly).WeekIndex; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlyScheduleInternal)RelativeMonthly).WeekIndex = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule _weekly; + + /// For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule Weekly { get => (this._weekly = this._weekly ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.WeeklySchedule()); set => this._weekly = value; } + + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string WeeklyDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklyScheduleInternal)Weekly).DayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklyScheduleInternal)Weekly).DayOfWeek = value ?? null; } + + /// Specifies the number of weeks between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? WeeklyIntervalWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklyScheduleInternal)Weekly).IntervalWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklyScheduleInternal)Weekly).IntervalWeek = value ?? default(int); } + + /// Creates an new instance. + public Schedule() + { + + } + } + /// One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', 'absoluteMonthly' or 'relativeMonthly' + /// for your maintenance schedule. + public partial interface ISchedule : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The date of the month. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The date of the month.", + SerializedName = @"dayOfMonth", + PossibleTypes = new [] { typeof(int) })] + int? AbsoluteMonthlyDayOfMonth { get; set; } + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + int? AbsoluteMonthlyIntervalMonth { get; set; } + /// Specifies the number of days between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of days between each set of occurrences.", + SerializedName = @"intervalDays", + PossibleTypes = new [] { typeof(int) })] + int? DailyIntervalDay { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string RelativeMonthlyDayOfWeek { get; set; } + /// Specifies the number of months between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + int? RelativeMonthlyIntervalMonth { get; set; } + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The week index. Specifies on which week of the month the dayOfWeek applies.", + SerializedName = @"weekIndex", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + string RelativeMonthlyWeekIndex { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string WeeklyDayOfWeek { get; set; } + /// Specifies the number of weeks between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of weeks between each set of occurrences.", + SerializedName = @"intervalWeeks", + PossibleTypes = new [] { typeof(int) })] + int? WeeklyIntervalWeek { get; set; } + + } + /// One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', 'absoluteMonthly' or 'relativeMonthly' + /// for your maintenance schedule. + internal partial interface IScheduleInternal + + { + /// + /// For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAbsoluteMonthlySchedule AbsoluteMonthly { get; set; } + /// The date of the month. + int? AbsoluteMonthlyDayOfMonth { get; set; } + /// Specifies the number of months between each set of occurrences. + int? AbsoluteMonthlyIntervalMonth { get; set; } + /// For schedules like: 'recur every day' or 'recur every 3 days'. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDailySchedule Daily { get; set; } + /// Specifies the number of days between each set of occurrences. + int? DailyIntervalDay { get; set; } + /// + /// For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRelativeMonthlySchedule RelativeMonthly { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string RelativeMonthlyDayOfWeek { get; set; } + /// Specifies the number of months between each set of occurrences. + int? RelativeMonthlyIntervalMonth { get; set; } + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + string RelativeMonthlyWeekIndex { get; set; } + /// For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule Weekly { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string WeeklyDayOfWeek { get; set; } + /// Specifies the number of weeks between each set of occurrences. + int? WeeklyIntervalWeek { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/Schedule.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/Schedule.json.cs new file mode 100644 index 000000000000..93c8181f9270 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/Schedule.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', 'absoluteMonthly' or 'relativeMonthly' + /// for your maintenance schedule. + /// + public partial class Schedule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new Schedule(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal Schedule(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_daily = If( json?.PropertyT("daily"), out var __jsonDaily) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.DailySchedule.FromJson(__jsonDaily) : _daily;} + {_weekly = If( json?.PropertyT("weekly"), out var __jsonWeekly) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.WeeklySchedule.FromJson(__jsonWeekly) : _weekly;} + {_absoluteMonthly = If( json?.PropertyT("absoluteMonthly"), out var __jsonAbsoluteMonthly) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AbsoluteMonthlySchedule.FromJson(__jsonAbsoluteMonthly) : _absoluteMonthly;} + {_relativeMonthly = If( json?.PropertyT("relativeMonthly"), out var __jsonRelativeMonthly) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RelativeMonthlySchedule.FromJson(__jsonRelativeMonthly) : _relativeMonthly;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._daily ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._daily.ToJson(null,serializationMode) : null, "daily" ,container.Add ); + AddIf( null != this._weekly ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._weekly.ToJson(null,serializationMode) : null, "weekly" ,container.Add ); + AddIf( null != this._absoluteMonthly ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._absoluteMonthly.ToJson(null,serializationMode) : null, "absoluteMonthly" ,container.Add ); + AddIf( null != this._relativeMonthly ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._relativeMonthly.ToJson(null,serializationMode) : null, "relativeMonthly" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ServiceMeshProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ServiceMeshProfile.PowerShell.cs new file mode 100644 index 000000000000..60edfe11c50e --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ServiceMeshProfile.PowerShell.cs @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Service mesh profile for a managed cluster. + [System.ComponentModel.TypeConverter(typeof(ServiceMeshProfileTypeConverter))] + public partial class ServiceMeshProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ServiceMeshProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ServiceMeshProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ServiceMeshProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Istio")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).Istio = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh) content.GetValueForProperty("Istio",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).Istio, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioServiceMeshTypeConverter.ConvertFrom); + } + if (content.Contains("Mode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).Mode = (string) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).Mode, global::System.Convert.ToString); + } + if (content.Contains("IstioComponent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).IstioComponent = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents) content.GetValueForProperty("IstioComponent",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).IstioComponent, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioComponentsTypeConverter.ConvertFrom); + } + if (content.Contains("IstioCertificateAuthority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).IstioCertificateAuthority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority) content.GetValueForProperty("IstioCertificateAuthority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).IstioCertificateAuthority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("IstioRevision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).IstioRevision = (System.Collections.Generic.List) content.GetValueForProperty("IstioRevision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).IstioRevision, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ComponentIngressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).ComponentIngressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentIngressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).ComponentIngressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioIngressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("ComponentEgressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).ComponentEgressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentEgressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).ComponentEgressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioEgressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("CertificateAuthorityPlugin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).CertificateAuthorityPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority) content.GetValueForProperty("CertificateAuthorityPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).CertificateAuthorityPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("PluginKeyVaultId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginKeyVaultId = (string) content.GetValueForProperty("PluginKeyVaultId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginKeyVaultId, global::System.Convert.ToString); + } + if (content.Contains("PluginCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginCertObjectName = (string) content.GetValueForProperty("PluginCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginKeyObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginKeyObjectName = (string) content.GetValueForProperty("PluginKeyObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginKeyObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginRootCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginRootCertObjectName = (string) content.GetValueForProperty("PluginRootCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginRootCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginCertChainObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginCertChainObjectName = (string) content.GetValueForProperty("PluginCertChainObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginCertChainObjectName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ServiceMeshProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Istio")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).Istio = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh) content.GetValueForProperty("Istio",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).Istio, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioServiceMeshTypeConverter.ConvertFrom); + } + if (content.Contains("Mode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).Mode = (string) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).Mode, global::System.Convert.ToString); + } + if (content.Contains("IstioComponent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).IstioComponent = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents) content.GetValueForProperty("IstioComponent",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).IstioComponent, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioComponentsTypeConverter.ConvertFrom); + } + if (content.Contains("IstioCertificateAuthority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).IstioCertificateAuthority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority) content.GetValueForProperty("IstioCertificateAuthority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).IstioCertificateAuthority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("IstioRevision")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).IstioRevision = (System.Collections.Generic.List) content.GetValueForProperty("IstioRevision",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).IstioRevision, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ComponentIngressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).ComponentIngressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentIngressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).ComponentIngressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioIngressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("ComponentEgressGateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).ComponentEgressGateway = (System.Collections.Generic.List) content.GetValueForProperty("ComponentEgressGateway",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).ComponentEgressGateway, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioEgressGatewayTypeConverter.ConvertFrom)); + } + if (content.Contains("CertificateAuthorityPlugin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).CertificateAuthorityPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority) content.GetValueForProperty("CertificateAuthorityPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).CertificateAuthorityPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioPluginCertificateAuthorityTypeConverter.ConvertFrom); + } + if (content.Contains("PluginKeyVaultId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginKeyVaultId = (string) content.GetValueForProperty("PluginKeyVaultId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginKeyVaultId, global::System.Convert.ToString); + } + if (content.Contains("PluginCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginCertObjectName = (string) content.GetValueForProperty("PluginCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginKeyObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginKeyObjectName = (string) content.GetValueForProperty("PluginKeyObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginKeyObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginRootCertObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginRootCertObjectName = (string) content.GetValueForProperty("PluginRootCertObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginRootCertObjectName, global::System.Convert.ToString); + } + if (content.Contains("PluginCertChainObjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginCertChainObjectName = (string) content.GetValueForProperty("PluginCertChainObjectName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal)this).PluginCertChainObjectName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Service mesh profile for a managed cluster. + [System.ComponentModel.TypeConverter(typeof(ServiceMeshProfileTypeConverter))] + public partial interface IServiceMeshProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ServiceMeshProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ServiceMeshProfile.TypeConverter.cs new file mode 100644 index 000000000000..28e37c1983e0 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ServiceMeshProfile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ServiceMeshProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ServiceMeshProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ServiceMeshProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ServiceMeshProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ServiceMeshProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ServiceMeshProfile.cs new file mode 100644 index 000000000000..9bacfbea3ce0 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ServiceMeshProfile.cs @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Service mesh profile for a managed cluster. + public partial class ServiceMeshProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal + { + + /// Istio egress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ComponentEgressGateway { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).ComponentEgressGateway; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).ComponentEgressGateway = value ?? null /* arrayOf */; } + + /// Istio ingress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ComponentIngressGateway { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).ComponentIngressGateway; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).ComponentIngressGateway = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh _istio; + + /// Istio service mesh configuration. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh Istio { get => (this._istio = this._istio ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioServiceMesh()); set => this._istio = value; } + + /// + /// The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary + /// upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List IstioRevision { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).Revision; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).Revision = value ?? null /* arrayOf */; } + + /// Internal Acessors for CertificateAuthorityPlugin + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal.CertificateAuthorityPlugin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).CertificateAuthorityPlugin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).CertificateAuthorityPlugin = value ?? null /* model class */; } + + /// Internal Acessors for Istio + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal.Istio { get => (this._istio = this._istio ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioServiceMesh()); set { {_istio = value;} } } + + /// Internal Acessors for IstioCertificateAuthority + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal.IstioCertificateAuthority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).CertificateAuthority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).CertificateAuthority = value ?? null /* model class */; } + + /// Internal Acessors for IstioComponent + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfileInternal.IstioComponent { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).Component; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).Component = value ?? null /* model class */; } + + /// Backing field for property. + private string _mode; + + /// Mode of the service mesh. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Mode { get => this._mode; set => this._mode = value; } + + /// Certificate chain object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginCertChainObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).PluginCertChainObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).PluginCertChainObjectName = value ?? null; } + + /// Intermediate certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginCertObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).PluginCertObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).PluginCertObjectName = value ?? null; } + + /// Intermediate certificate private key object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginKeyObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).PluginKeyObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).PluginKeyObjectName = value ?? null; } + + /// The resource ID of the Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginKeyVaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).PluginKeyVaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).PluginKeyVaultId = value ?? null; } + + /// Root certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PluginRootCertObjectName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).PluginRootCertObjectName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMeshInternal)Istio).PluginRootCertObjectName = value ?? null; } + + /// Creates an new instance. + public ServiceMeshProfile() + { + + } + } + /// Service mesh profile for a managed cluster. + public partial interface IServiceMeshProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Istio egress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Istio egress gateways.", + SerializedName = @"egressGateways", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioEgressGateway) })] + System.Collections.Generic.List ComponentEgressGateway { get; set; } + /// Istio ingress gateways. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Istio ingress gateways.", + SerializedName = @"ingressGateways", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioIngressGateway) })] + System.Collections.Generic.List ComponentIngressGateway { get; set; } + /// + /// The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary + /// upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade", + SerializedName = @"revisions", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List IstioRevision { get; set; } + /// Mode of the service mesh. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Mode of the service mesh.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Istio", "Disabled")] + string Mode { get; set; } + /// Certificate chain object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Certificate chain object name in Azure Key Vault.", + SerializedName = @"certChainObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginCertChainObjectName { get; set; } + /// Intermediate certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Intermediate certificate object name in Azure Key Vault.", + SerializedName = @"certObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginCertObjectName { get; set; } + /// Intermediate certificate private key object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Intermediate certificate private key object name in Azure Key Vault.", + SerializedName = @"keyObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginKeyObjectName { get; set; } + /// The resource ID of the Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The resource ID of the Key Vault.", + SerializedName = @"keyVaultId", + PossibleTypes = new [] { typeof(string) })] + string PluginKeyVaultId { get; set; } + /// Root certificate object name in Azure Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Root certificate object name in Azure Key Vault.", + SerializedName = @"rootCertObjectName", + PossibleTypes = new [] { typeof(string) })] + string PluginRootCertObjectName { get; set; } + + } + /// Service mesh profile for a managed cluster. + internal partial interface IServiceMeshProfileInternal + + { + /// Plugin certificates information for Service Mesh. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioPluginCertificateAuthority CertificateAuthorityPlugin { get; set; } + /// Istio egress gateways. + System.Collections.Generic.List ComponentEgressGateway { get; set; } + /// Istio ingress gateways. + System.Collections.Generic.List ComponentIngressGateway { get; set; } + /// Istio service mesh configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioServiceMesh Istio { get; set; } + /// + /// Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described + /// here https://aka.ms/asm-plugin-ca + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioCertificateAuthority IstioCertificateAuthority { get; set; } + /// Istio components configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IIstioComponents IstioComponent { get; set; } + /// + /// The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary + /// upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + /// + System.Collections.Generic.List IstioRevision { get; set; } + /// Mode of the service mesh. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Istio", "Disabled")] + string Mode { get; set; } + /// Certificate chain object name in Azure Key Vault. + string PluginCertChainObjectName { get; set; } + /// Intermediate certificate object name in Azure Key Vault. + string PluginCertObjectName { get; set; } + /// Intermediate certificate private key object name in Azure Key Vault. + string PluginKeyObjectName { get; set; } + /// The resource ID of the Key Vault. + string PluginKeyVaultId { get; set; } + /// Root certificate object name in Azure Key Vault. + string PluginRootCertObjectName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/ServiceMeshProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/ServiceMeshProfile.json.cs new file mode 100644 index 000000000000..a2e6bec8c8b2 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/ServiceMeshProfile.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Service mesh profile for a managed cluster. + public partial class ServiceMeshProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IServiceMeshProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ServiceMeshProfile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal ServiceMeshProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_istio = If( json?.PropertyT("istio"), out var __jsonIstio) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IstioServiceMesh.FromJson(__jsonIstio) : _istio;} + {_mode = If( json?.PropertyT("mode"), out var __jsonMode) ? (string)__jsonMode : (string)_mode;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._istio ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._istio.ToJson(null,serializationMode) : null, "istio" ,container.Add ); + AddIf( null != (((object)this._mode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._mode.ToString()) : null, "mode" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/Snapshot.cs b/generated/Aks/Aks.Autorest/generated/api/Models/Snapshot.cs index 8893b060df41..eeb6a8ae6ed4 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/Snapshot.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/Snapshot.cs @@ -27,7 +27,7 @@ public partial class Snapshot : public bool? EnableFips { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).EnableFips; } /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id; } @@ -41,58 +41,58 @@ public partial class Snapshot : public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrackedResourceInternal)__trackedResource).Location = value ?? null; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemData = value ?? null /* model class */; } /// Internal Acessors for SystemDataCreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// Internal Acessors for SystemDataCreatedBy - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } /// Internal Acessors for SystemDataCreatedByType - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? null; } /// Internal Acessors for SystemDataLastModifiedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// Internal Acessors for SystemDataLastModifiedBy - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } /// Internal Acessors for SystemDataLastModifiedByType - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__trackedResource).Type = value ?? null; } /// Internal Acessors for CreationData - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICreationData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.CreationData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).CreationData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).CreationData = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICreationData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.CreationData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).CreationData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).CreationData = value ?? null /* model class */; } /// Internal Acessors for EnableFips - bool? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.EnableFips { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).EnableFips; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).EnableFips = value; } + bool? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.EnableFips { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).EnableFips; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).EnableFips = value ?? default(bool); } /// Internal Acessors for KubernetesVersion - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).KubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).KubernetesVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).KubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).KubernetesVersion = value ?? null; } /// Internal Acessors for NodeImageVersion - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.NodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).NodeImageVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).NodeImageVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.NodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).NodeImageVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).NodeImageVersion = value ?? null; } /// Internal Acessors for OSSku - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.OSSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).OSSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).OSSku = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.OSSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).OSSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).OSSku = value ?? null; } /// Internal Acessors for OSType - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).OSType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).OSType = value ?? null; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SnapshotProperties()); set { {_property = value;} } } /// Internal Acessors for VMSize - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.VMSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).VMSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).VMSize = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotInternal.VMSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).VMSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshotPropertiesInternal)Property).VMSize = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] @@ -252,7 +252,7 @@ public partial interface ISnapshot : Description = @"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.", SerializedName = @"osSku", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "CBLMariner", "Windows2019", "Windows2022")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "AzureLinux", "AzureLinux3", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204")] string OSSku { get; } /// The operating system type. The default is Linux. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -311,7 +311,7 @@ internal partial interface ISnapshotInternal : /// 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. ///
- [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "CBLMariner", "Windows2019", "Windows2022")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "AzureLinux", "AzureLinux3", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204")] string OSSku { get; set; } /// The operating system type. The default is Linux. [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Linux", "Windows")] diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/SnapshotProperties.cs b/generated/Aks/Aks.Autorest/generated/api/Models/SnapshotProperties.cs index c9176b0be59b..6f7f75d1a433 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/SnapshotProperties.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/SnapshotProperties.cs @@ -166,7 +166,7 @@ public partial interface ISnapshotProperties : Description = @"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.", SerializedName = @"osSku", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "CBLMariner", "Windows2019", "Windows2022")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "AzureLinux", "AzureLinux3", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204")] string OSSku { get; } /// The operating system type. The default is Linux. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( @@ -225,7 +225,7 @@ internal partial interface ISnapshotPropertiesInternal /// 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. ///
- [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "CBLMariner", "Windows2019", "Windows2022")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Ubuntu", "AzureLinux", "AzureLinux3", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204")] string OSSku { get; set; } /// The operating system type. The default is Linux. [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Linux", "Windows")] diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TimeInWeek.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TimeInWeek.cs index e29685e6b434..1b005494ae40 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/TimeInWeek.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TimeInWeek.cs @@ -24,8 +24,9 @@ public partial class TimeInWeek : private System.Collections.Generic.List _hourSlot; /// - /// Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds - /// to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + /// A list of hours in the day used to identify a time range. Each integer hour represents a time range beginning at 0m after + /// the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying + /// [0, 1] means the 00:00 - 02:00 UTC time range. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public System.Collections.Generic.List HourSlot { get => this._hourSlot; set => this._hourSlot = value; } @@ -53,8 +54,9 @@ public partial interface ITimeInWeek : [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] string Day { get; set; } /// - /// Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds - /// to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + /// A list of hours in the day used to identify a time range. Each integer hour represents a time range beginning at 0m after + /// the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying + /// [0, 1] means the 00:00 - 02:00 UTC time range. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -62,7 +64,7 @@ public partial interface ITimeInWeek : Read = true, Create = true, Update = true, - Description = @"Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.", + Description = @"A list of hours in the day used to identify a time range. Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.", SerializedName = @"hourSlots", PossibleTypes = new [] { typeof(int) })] System.Collections.Generic.List HourSlot { get; set; } @@ -76,8 +78,9 @@ internal partial interface ITimeInWeekInternal [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] string Day { get; set; } /// - /// Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds - /// to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + /// A list of hours in the day used to identify a time range. Each integer hour represents a time range beginning at 0m after + /// the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying + /// [0, 1] means the 00:00 - 02:00 UTC time range. /// System.Collections.Generic.List HourSlot { get; set; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TimeSpan.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TimeSpan.PowerShell.cs index 498427eaad34..bedb1bcf5791 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/TimeSpan.PowerShell.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TimeSpan.PowerShell.cs @@ -7,7 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + /// + /// A time range. For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + /// [System.ComponentModel.TypeConverter(typeof(TimeSpanTypeConverter))] public partial class TimeSpan { @@ -162,7 +164,7 @@ public override string ToString() return ToJsonString(); } } - /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + /// A time range. For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. [System.ComponentModel.TypeConverter(typeof(TimeSpanTypeConverter))] public partial interface ITimeSpan diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TimeSpan.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TimeSpan.cs index f89c0552fcdc..775b6770f0e4 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/TimeSpan.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TimeSpan.cs @@ -7,7 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + /// + /// A time range. For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + /// public partial class TimeSpan : Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpan, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpanInternal @@ -33,7 +35,7 @@ public TimeSpan() } } - /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + /// A time range. For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. public partial interface ITimeSpan : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { @@ -61,7 +63,7 @@ public partial interface ITimeSpan : global::System.DateTime? Start { get; set; } } - /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + /// A time range. For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. internal partial interface ITimeSpanInternal { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TimeSpan.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TimeSpan.json.cs index 965b9fa6c651..2e187762f6e1 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/TimeSpan.json.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TimeSpan.json.cs @@ -7,7 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + /// + /// A time range. For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + /// public partial class TimeSpan { diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrackedResource.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrackedResource.cs index 35454d03a505..421fd1be26e1 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/TrackedResource.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrackedResource.cs @@ -21,7 +21,7 @@ public partial class TrackedResource : private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Resource(); /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Id; } @@ -34,34 +34,34 @@ public partial class TrackedResource : public string Location { get => this._location; set => this._location = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } /// Internal Acessors for SystemDataCreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// Internal Acessors for SystemDataCreatedBy - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedBy = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } /// Internal Acessors for SystemDataCreatedByType - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedByType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } /// Internal Acessors for SystemDataLastModifiedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// Internal Acessors for SystemDataLastModifiedBy - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } /// Internal Acessors for SystemDataLastModifiedByType - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Type = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRole.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRole.PowerShell.cs new file mode 100644 index 000000000000..bb0f4aca1888 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRole.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Trusted access role definition. + [System.ComponentModel.TypeConverter(typeof(TrustedAccessRoleTypeConverter))] + public partial class TrustedAccessRole + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrustedAccessRole(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrustedAccessRole(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrustedAccessRole(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SourceResourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal)this).SourceResourceType = (string) content.GetValueForProperty("SourceResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal)this).SourceResourceType, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Rule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal)this).Rule = (System.Collections.Generic.List) content.GetValueForProperty("Rule",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal)this).Rule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleRuleTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrustedAccessRole(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SourceResourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal)this).SourceResourceType = (string) content.GetValueForProperty("SourceResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal)this).SourceResourceType, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Rule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal)this).Rule = (System.Collections.Generic.List) content.GetValueForProperty("Rule",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal)this).Rule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleRuleTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + } + /// Trusted access role definition. + [System.ComponentModel.TypeConverter(typeof(TrustedAccessRoleTypeConverter))] + public partial interface ITrustedAccessRole + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRole.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRole.TypeConverter.cs new file mode 100644 index 000000000000..24aea0b15800 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRole.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrustedAccessRoleTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrustedAccessRole.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrustedAccessRole.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrustedAccessRole.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRole.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRole.cs new file mode 100644 index 000000000000..0e0a6d5f299b --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRole.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Trusted access role definition. + public partial class TrustedAccessRole : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal + { + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for Rule + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal.Rule { get => this._rule; set { {_rule = value;} } } + + /// Internal Acessors for SourceResourceType + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleInternal.SourceResourceType { get => this._sourceResourceType; set { {_sourceResourceType = value;} } } + + /// Backing field for property. + private string _name; + + /// Name of role, name is unique under a source resource type + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private System.Collections.Generic.List _rule; + + /// + /// 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Rule { get => this._rule; } + + /// Backing field for property. + private string _sourceResourceType; + + /// Resource type of Azure resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string SourceResourceType { get => this._sourceResourceType; } + + /// Creates an new instance. + public TrustedAccessRole() + { + + } + } + /// Trusted access role definition. + public partial interface ITrustedAccessRole : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Name of role, name is unique under a source resource type + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Name of role, name is unique under a source resource type", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// + /// 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"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).", + SerializedName = @"rules", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRule) })] + System.Collections.Generic.List Rule { get; } + /// Resource type of Azure resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Resource type of Azure resource", + SerializedName = @"sourceResourceType", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceType { get; } + + } + /// Trusted access role definition. + internal partial interface ITrustedAccessRoleInternal + + { + /// Name of role, name is unique under a source resource type + string Name { get; set; } + /// + /// 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). + /// + System.Collections.Generic.List Rule { get; set; } + /// Resource type of Azure resource + string SourceResourceType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRole.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRole.json.cs new file mode 100644 index 000000000000..54705e065642 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRole.json.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Trusted access role definition. + public partial class TrustedAccessRole + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new TrustedAccessRole(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._sourceResourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._sourceResourceType.ToString()) : null, "sourceResourceType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._rule) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._rule ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("rules",__w); + } + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal TrustedAccessRole(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_sourceResourceType = If( json?.PropertyT("sourceResourceType"), out var __jsonSourceResourceType) ? (string)__jsonSourceResourceType : (string)_sourceResourceType;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_rule = If( json?.PropertyT("rules"), out var __jsonRules) ? If( __jsonRules as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRule) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleRule.FromJson(__u) )) ))() : null : _rule;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBinding.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBinding.PowerShell.cs new file mode 100644 index 000000000000..00ab3992c145 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBinding.PowerShell.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Defines binding between a resource and role + [System.ComponentModel.TypeConverter(typeof(TrustedAccessRoleBindingTypeConverter))] + public partial class TrustedAccessRoleBinding + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrustedAccessRoleBinding(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrustedAccessRoleBinding(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrustedAccessRoleBinding(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBindingPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).Role = (System.Collections.Generic.List) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).Role, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrustedAccessRoleBinding(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBindingPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).Role = (System.Collections.Generic.List) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal)this).Role, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + } + /// Defines binding between a resource and role + [System.ComponentModel.TypeConverter(typeof(TrustedAccessRoleBindingTypeConverter))] + public partial interface ITrustedAccessRoleBinding + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBinding.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBinding.TypeConverter.cs new file mode 100644 index 000000000000..30adbc5d4246 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBinding.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrustedAccessRoleBindingTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrustedAccessRoleBinding.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrustedAccessRoleBinding.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrustedAccessRoleBinding.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBinding.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBinding.cs new file mode 100644 index 000000000000..47fec6da9157 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBinding.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Defines binding between a resource and role + public partial class TrustedAccessRoleBinding : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Type = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBindingProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties _property; + + /// Properties for trusted access role binding + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBindingProperties()); set => this._property = value; } + + /// The current provisioning state of trusted access role binding. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)Property).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)Property).Role = value ; } + + /// The ARM resource ID of source resource that trusted access is configured for. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)Property).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)Property).SourceResourceId = value ; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public TrustedAccessRoleBinding() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Defines binding between a resource and role + public partial interface ITrustedAccessRoleBinding : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResource + { + /// The current provisioning state of trusted access role binding. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current provisioning state of trusted access role binding.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Canceled", "Deleting", "Failed", "Succeeded", "Updating")] + string ProvisioningState { get; } + /// + /// A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'.", + SerializedName = @"roles", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List Role { get; set; } + /// The ARM resource ID of source resource that trusted access is configured for. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The ARM resource ID of source resource that trusted access is configured for.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + + } + /// Defines binding between a resource and role + internal partial interface ITrustedAccessRoleBindingInternal : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IResourceInternal + { + /// Properties for trusted access role binding + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties Property { get; set; } + /// The current provisioning state of trusted access role binding. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Canceled", "Deleting", "Failed", "Succeeded", "Updating")] + string ProvisioningState { get; set; } + /// + /// A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'. + /// + System.Collections.Generic.List Role { get; set; } + /// The ARM resource ID of source resource that trusted access is configured for. + string SourceResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBinding.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBinding.json.cs new file mode 100644 index 000000000000..d67b7f3950d3 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBinding.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Defines binding between a resource and role + public partial class TrustedAccessRoleBinding + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new TrustedAccessRoleBinding(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal TrustedAccessRoleBinding(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBindingProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingListResult.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingListResult.PowerShell.cs new file mode 100644 index 000000000000..8aaa96997914 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingListResult.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// List of trusted access role bindings + [System.ComponentModel.TypeConverter(typeof(TrustedAccessRoleBindingListResultTypeConverter))] + public partial class TrustedAccessRoleBindingListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrustedAccessRoleBindingListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrustedAccessRoleBindingListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrustedAccessRoleBindingListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBindingTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrustedAccessRoleBindingListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBindingTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// List of trusted access role bindings + [System.ComponentModel.TypeConverter(typeof(TrustedAccessRoleBindingListResultTypeConverter))] + public partial interface ITrustedAccessRoleBindingListResult + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingListResult.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingListResult.TypeConverter.cs new file mode 100644 index 000000000000..718bb7409633 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingListResult.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrustedAccessRoleBindingListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrustedAccessRoleBindingListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrustedAccessRoleBindingListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrustedAccessRoleBindingListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingListResult.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingListResult.cs new file mode 100644 index 000000000000..9f4b49969e9f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingListResult.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// List of trusted access role bindings + public partial class TrustedAccessRoleBindingListResult : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResult, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// Link to next page of resources. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// Role binding list + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public TrustedAccessRoleBindingListResult() + { + + } + } + /// List of trusted access role bindings + public partial interface ITrustedAccessRoleBindingListResult : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Link to next page of resources. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Link to next page of resources.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// Role binding list + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Role binding list", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding) })] + System.Collections.Generic.List Value { get; set; } + + } + /// List of trusted access role bindings + internal partial interface ITrustedAccessRoleBindingListResultInternal + + { + /// Link to next page of resources. + string NextLink { get; set; } + /// Role binding list + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingListResult.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingListResult.json.cs new file mode 100644 index 000000000000..f8da2ef1d39d --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingListResult.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// List of trusted access role bindings + public partial class TrustedAccessRoleBindingListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new TrustedAccessRoleBindingListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal TrustedAccessRoleBindingListResult(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBinding.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingProperties.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingProperties.PowerShell.cs new file mode 100644 index 000000000000..f8d45c74c9fa --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingProperties.PowerShell.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Properties for trusted access role binding + [System.ComponentModel.TypeConverter(typeof(TrustedAccessRoleBindingPropertiesTypeConverter))] + public partial class TrustedAccessRoleBindingProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrustedAccessRoleBindingProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrustedAccessRoleBindingProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrustedAccessRoleBindingProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)this).Role = (System.Collections.Generic.List) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)this).Role, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrustedAccessRoleBindingProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)this).Role = (System.Collections.Generic.List) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal)this).Role, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + } + /// Properties for trusted access role binding + [System.ComponentModel.TypeConverter(typeof(TrustedAccessRoleBindingPropertiesTypeConverter))] + public partial interface ITrustedAccessRoleBindingProperties + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingProperties.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingProperties.TypeConverter.cs new file mode 100644 index 000000000000..e8ce9cd66082 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingProperties.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrustedAccessRoleBindingPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrustedAccessRoleBindingProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrustedAccessRoleBindingProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrustedAccessRoleBindingProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingProperties.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingProperties.cs new file mode 100644 index 000000000000..95309f3ae482 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingProperties.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Properties for trusted access role binding + public partial class TrustedAccessRoleBindingProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal + { + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The current provisioning state of trusted access role binding. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private System.Collections.Generic.List _role; + + /// + /// A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Role { get => this._role; set => this._role = value; } + + /// Backing field for property. + private string _sourceResourceId; + + /// The ARM resource ID of source resource that trusted access is configured for. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string SourceResourceId { get => this._sourceResourceId; set => this._sourceResourceId = value; } + + /// Creates an new instance. + public TrustedAccessRoleBindingProperties() + { + + } + } + /// Properties for trusted access role binding + public partial interface ITrustedAccessRoleBindingProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The current provisioning state of trusted access role binding. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current provisioning state of trusted access role binding.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Canceled", "Deleting", "Failed", "Succeeded", "Updating")] + string ProvisioningState { get; } + /// + /// A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'.", + SerializedName = @"roles", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List Role { get; set; } + /// The ARM resource ID of source resource that trusted access is configured for. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The ARM resource ID of source resource that trusted access is configured for.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + + } + /// Properties for trusted access role binding + internal partial interface ITrustedAccessRoleBindingPropertiesInternal + + { + /// The current provisioning state of trusted access role binding. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Canceled", "Deleting", "Failed", "Succeeded", "Updating")] + string ProvisioningState { get; set; } + /// + /// A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'. + /// + System.Collections.Generic.List Role { get; set; } + /// The ARM resource ID of source resource that trusted access is configured for. + string SourceResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingProperties.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingProperties.json.cs new file mode 100644 index 000000000000..4bf1e4334284 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleBindingProperties.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Properties for trusted access role binding + public partial class TrustedAccessRoleBindingProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new TrustedAccessRoleBindingProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AddIf( null != (((object)this._sourceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._sourceResourceId.ToString()) : null, "sourceResourceId" ,container.Add ); + if (null != this._role) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._role ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("roles",__w); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal TrustedAccessRoleBindingProperties(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)_sourceResourceId;} + {_role = If( json?.PropertyT("roles"), out var __jsonRoles) ? If( __jsonRoles as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _role;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleListResult.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleListResult.PowerShell.cs new file mode 100644 index 000000000000..ed306f8747e8 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// List of trusted access roles + [System.ComponentModel.TypeConverter(typeof(TrustedAccessRoleListResultTypeConverter))] + public partial class TrustedAccessRoleListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrustedAccessRoleListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrustedAccessRoleListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrustedAccessRoleListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrustedAccessRoleListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// List of trusted access roles + [System.ComponentModel.TypeConverter(typeof(TrustedAccessRoleListResultTypeConverter))] + public partial interface ITrustedAccessRoleListResult + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleListResult.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleListResult.TypeConverter.cs new file mode 100644 index 000000000000..95cb86c36901 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrustedAccessRoleListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrustedAccessRoleListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrustedAccessRoleListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrustedAccessRoleListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleListResult.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleListResult.cs new file mode 100644 index 000000000000..37ff38d4bb83 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// List of trusted access roles + public partial class TrustedAccessRoleListResult : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResult, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// Link to next page of resources. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// Role list + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public TrustedAccessRoleListResult() + { + + } + } + /// List of trusted access roles + public partial interface ITrustedAccessRoleListResult : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Link to next page of resources. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Link to next page of resources.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// Role list + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Role list", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole) })] + System.Collections.Generic.List Value { get; } + + } + /// List of trusted access roles + internal partial interface ITrustedAccessRoleListResultInternal + + { + /// Link to next page of resources. + string NextLink { get; set; } + /// Role list + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleListResult.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleListResult.json.cs new file mode 100644 index 000000000000..931da90c544e --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleListResult.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// List of trusted access roles + public partial class TrustedAccessRoleListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new TrustedAccessRoleListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal TrustedAccessRoleListResult(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRole.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleRule.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleRule.PowerShell.cs new file mode 100644 index 000000000000..f4aa529b7f14 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleRule.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Rule for trusted access role + [System.ComponentModel.TypeConverter(typeof(TrustedAccessRoleRuleTypeConverter))] + public partial class TrustedAccessRoleRule + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRule DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrustedAccessRoleRule(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrustedAccessRoleRule(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrustedAccessRoleRule(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Verb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).Verb = (System.Collections.Generic.List) content.GetValueForProperty("Verb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).Verb, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ApiGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).ApiGroup = (System.Collections.Generic.List) content.GetValueForProperty("ApiGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).ApiGroup, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).Resource = (System.Collections.Generic.List) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).Resource, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ResourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).ResourceName = (System.Collections.Generic.List) content.GetValueForProperty("ResourceName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).ResourceName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("NonResourceUrL")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).NonResourceUrL = (System.Collections.Generic.List) content.GetValueForProperty("NonResourceUrL",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).NonResourceUrL, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrustedAccessRoleRule(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Verb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).Verb = (System.Collections.Generic.List) content.GetValueForProperty("Verb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).Verb, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ApiGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).ApiGroup = (System.Collections.Generic.List) content.GetValueForProperty("ApiGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).ApiGroup, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).Resource = (System.Collections.Generic.List) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).Resource, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ResourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).ResourceName = (System.Collections.Generic.List) content.GetValueForProperty("ResourceName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).ResourceName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("NonResourceUrL")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).NonResourceUrL = (System.Collections.Generic.List) content.GetValueForProperty("NonResourceUrL",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal)this).NonResourceUrL, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + } + /// Rule for trusted access role + [System.ComponentModel.TypeConverter(typeof(TrustedAccessRoleRuleTypeConverter))] + public partial interface ITrustedAccessRoleRule + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleRule.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleRule.TypeConverter.cs new file mode 100644 index 000000000000..fcc0712e83f2 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleRule.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrustedAccessRoleRuleTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRule ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRule).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrustedAccessRoleRule.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrustedAccessRoleRule.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrustedAccessRoleRule.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleRule.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleRule.cs new file mode 100644 index 000000000000..00c1a70f9d62 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleRule.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Rule for trusted access role + public partial class TrustedAccessRoleRule : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRule, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _apiGroup; + + /// List of allowed apiGroups + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List ApiGroup { get => this._apiGroup; } + + /// Internal Acessors for ApiGroup + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal.ApiGroup { get => this._apiGroup; set { {_apiGroup = value;} } } + + /// Internal Acessors for NonResourceUrL + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal.NonResourceUrL { get => this._nonResourceUrL; set { {_nonResourceUrL = value;} } } + + /// Internal Acessors for Resource + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal.Resource { get => this._resource; set { {_resource = value;} } } + + /// Internal Acessors for ResourceName + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal.ResourceName { get => this._resourceName; set { {_resourceName = value;} } } + + /// Internal Acessors for Verb + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRuleInternal.Verb { get => this._verb; set { {_verb = value;} } } + + /// Backing field for property. + private System.Collections.Generic.List _nonResourceUrL; + + /// List of allowed nonResourceURLs + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List NonResourceUrL { get => this._nonResourceUrL; } + + /// Backing field for property. + private System.Collections.Generic.List _resource; + + /// List of allowed resources + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Resource { get => this._resource; } + + /// Backing field for property. + private System.Collections.Generic.List _resourceName; + + /// List of allowed names + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List ResourceName { get => this._resourceName; } + + /// Backing field for property. + private System.Collections.Generic.List _verb; + + /// List of allowed verbs + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public System.Collections.Generic.List Verb { get => this._verb; } + + /// Creates an new instance. + public TrustedAccessRoleRule() + { + + } + } + /// Rule for trusted access role + public partial interface ITrustedAccessRoleRule : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// List of allowed apiGroups + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of allowed apiGroups", + SerializedName = @"apiGroups", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List ApiGroup { get; } + /// List of allowed nonResourceURLs + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of allowed nonResourceURLs", + SerializedName = @"nonResourceURLs", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List NonResourceUrL { get; } + /// List of allowed resources + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of allowed resources", + SerializedName = @"resources", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List Resource { get; } + /// List of allowed names + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of allowed names", + SerializedName = @"resourceNames", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List ResourceName { get; } + /// List of allowed verbs + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of allowed verbs", + SerializedName = @"verbs", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List Verb { get; } + + } + /// Rule for trusted access role + internal partial interface ITrustedAccessRoleRuleInternal + + { + /// List of allowed apiGroups + System.Collections.Generic.List ApiGroup { get; set; } + /// List of allowed nonResourceURLs + System.Collections.Generic.List NonResourceUrL { get; set; } + /// List of allowed resources + System.Collections.Generic.List Resource { get; set; } + /// List of allowed names + System.Collections.Generic.List ResourceName { get; set; } + /// List of allowed verbs + System.Collections.Generic.List Verb { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleRule.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleRule.json.cs new file mode 100644 index 000000000000..4bb3cbd1ac92 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/TrustedAccessRoleRule.json.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Rule for trusted access role + public partial class TrustedAccessRoleRule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleRule FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new TrustedAccessRoleRule(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._verb) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._verb ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("verbs",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._apiGroup) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __s in this._apiGroup ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("apiGroups",__r); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._resource) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __n in this._resource ) + { + AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + } + container.Add("resources",__m); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._resourceName) + { + var __h = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __i in this._resourceName ) + { + AddIf(null != (((object)__i)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__i.ToString()) : null ,__h.Add); + } + container.Add("resourceNames",__h); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._nonResourceUrL) + { + var __c = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __d in this._nonResourceUrL ) + { + AddIf(null != (((object)__d)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(__d.ToString()) : null ,__c.Add); + } + container.Add("nonResourceURLs",__c); + } + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal TrustedAccessRoleRule(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_verb = If( json?.PropertyT("verbs"), out var __jsonVerbs) ? If( __jsonVerbs as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _verb;} + {_apiGroup = If( json?.PropertyT("apiGroups"), out var __jsonApiGroups) ? If( __jsonApiGroups as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : _apiGroup;} + {_resource = If( json?.PropertyT("resources"), out var __jsonResources) ? If( __jsonResources as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : _resource;} + {_resourceName = If( json?.PropertyT("resourceNames"), out var __jsonResourceNames) ? If( __jsonResourceNames as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __g) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : _resourceName;} + {_nonResourceUrL = If( json?.PropertyT("nonResourceURLs"), out var __jsonNonResourceUrLs) ? If( __jsonNonResourceUrLs as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __b) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__b, (__a)=>(string) (__a is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString ___z ? (string)(___z.ToString()) : null)) ))() : null : _nonResourceUrL;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/UpgradeOverrideSettings.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/UpgradeOverrideSettings.PowerShell.cs new file mode 100644 index 000000000000..b560c92772e9 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/UpgradeOverrideSettings.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Settings for overrides when upgrading a cluster. + [System.ComponentModel.TypeConverter(typeof(UpgradeOverrideSettingsTypeConverter))] + public partial class UpgradeOverrideSettings + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UpgradeOverrideSettings(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UpgradeOverrideSettings(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UpgradeOverrideSettings(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ForceUpgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettingsInternal)this).ForceUpgrade = (bool?) content.GetValueForProperty("ForceUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettingsInternal)this).ForceUpgrade, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Until")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettingsInternal)this).Until = (global::System.DateTime?) content.GetValueForProperty("Until",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettingsInternal)this).Until, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UpgradeOverrideSettings(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ForceUpgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettingsInternal)this).ForceUpgrade = (bool?) content.GetValueForProperty("ForceUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettingsInternal)this).ForceUpgrade, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Until")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettingsInternal)this).Until = (global::System.DateTime?) content.GetValueForProperty("Until",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettingsInternal)this).Until, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + } + /// Settings for overrides when upgrading a cluster. + [System.ComponentModel.TypeConverter(typeof(UpgradeOverrideSettingsTypeConverter))] + public partial interface IUpgradeOverrideSettings + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/UpgradeOverrideSettings.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/UpgradeOverrideSettings.TypeConverter.cs new file mode 100644 index 000000000000..030cc7363baa --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/UpgradeOverrideSettings.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UpgradeOverrideSettingsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UpgradeOverrideSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UpgradeOverrideSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UpgradeOverrideSettings.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/UpgradeOverrideSettings.cs b/generated/Aks/Aks.Autorest/generated/api/Models/UpgradeOverrideSettings.cs new file mode 100644 index 000000000000..11a6ff281d31 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/UpgradeOverrideSettings.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Settings for overrides when upgrading a cluster. + public partial class UpgradeOverrideSettings : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettingsInternal + { + + /// Backing field for property. + private bool? _forceUpgrade; + + /// + /// Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections + /// such as checking for deprecated API usage. Enable this option only with caution. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? ForceUpgrade { get => this._forceUpgrade; set => this._forceUpgrade = value; } + + /// Backing field for property. + private global::System.DateTime? _until; + + /// + /// Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness + /// won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. + /// It must be set for the overrides to take effect. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public global::System.DateTime? Until { get => this._until; set => this._until = value; } + + /// Creates an new instance. + public UpgradeOverrideSettings() + { + + } + } + /// Settings for overrides when upgrading a cluster. + public partial interface IUpgradeOverrideSettings : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections + /// such as checking for deprecated API usage. Enable this option only with caution. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections such as checking for deprecated API usage. Enable this option only with caution.", + SerializedName = @"forceUpgrade", + PossibleTypes = new [] { typeof(bool) })] + bool? ForceUpgrade { get; set; } + /// + /// Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness + /// won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. + /// It must be set for the overrides to take effect. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. It must be set for the overrides to take effect.", + SerializedName = @"until", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Until { get; set; } + + } + /// Settings for overrides when upgrading a cluster. + internal partial interface IUpgradeOverrideSettingsInternal + + { + /// + /// Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections + /// such as checking for deprecated API usage. Enable this option only with caution. + /// + bool? ForceUpgrade { get; set; } + /// + /// Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness + /// won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. + /// It must be set for the overrides to take effect. + /// + global::System.DateTime? Until { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/UpgradeOverrideSettings.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/UpgradeOverrideSettings.json.cs new file mode 100644 index 000000000000..28f55229ee2d --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/UpgradeOverrideSettings.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Settings for overrides when upgrading a cluster. + public partial class UpgradeOverrideSettings + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IUpgradeOverrideSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new UpgradeOverrideSettings(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._forceUpgrade ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._forceUpgrade) : null, "forceUpgrade" ,container.Add ); + AddIf( null != this._until ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._until?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "until" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal UpgradeOverrideSettings(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_forceUpgrade = If( json?.PropertyT("forceUpgrade"), out var __jsonForceUpgrade) ? (bool?)__jsonForceUpgrade : _forceUpgrade;} + {_until = If( json?.PropertyT("until"), out var __jsonUntil) ? global::System.DateTime.TryParse((string)__jsonUntil, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUntilValue) ? __jsonUntilValue : _until : _until;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachineNodes.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachineNodes.PowerShell.cs new file mode 100644 index 000000000000..6df4faecbc9f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachineNodes.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Current status on a group of nodes of the same vm size. + [System.ComponentModel.TypeConverter(typeof(VirtualMachineNodesTypeConverter))] + public partial class VirtualMachineNodes + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodes DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new VirtualMachineNodes(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodes DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new VirtualMachineNodes(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodes FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal VirtualMachineNodes(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Size")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodesInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodesInternal)this).Size, global::System.Convert.ToString); + } + if (content.Contains("Count")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal VirtualMachineNodes(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Size")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodesInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodesInternal)this).Size, global::System.Convert.ToString); + } + if (content.Contains("Count")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + } + /// Current status on a group of nodes of the same vm size. + [System.ComponentModel.TypeConverter(typeof(VirtualMachineNodesTypeConverter))] + public partial interface IVirtualMachineNodes + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachineNodes.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachineNodes.TypeConverter.cs new file mode 100644 index 000000000000..e3649302cd34 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachineNodes.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class VirtualMachineNodesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodes ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodes).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return VirtualMachineNodes.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return VirtualMachineNodes.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return VirtualMachineNodes.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachineNodes.cs b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachineNodes.cs new file mode 100644 index 000000000000..64c58a5e5978 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachineNodes.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Current status on a group of nodes of the same vm size. + public partial class VirtualMachineNodes : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodes, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodesInternal + { + + /// Backing field for property. + private int? _count; + + /// Number of nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? Count { get => this._count; set => this._count = value; } + + /// Backing field for property. + private string _size; + + /// The VM size of the agents used to host this group of nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Size { get => this._size; set => this._size = value; } + + /// Creates an new instance. + public VirtualMachineNodes() + { + + } + } + /// Current status on a group of nodes of the same vm size. + public partial interface IVirtualMachineNodes : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Number of nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Number of nodes.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? Count { get; set; } + /// The VM size of the agents used to host this group of nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The VM size of the agents used to host this group of nodes.", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + string Size { get; set; } + + } + /// Current status on a group of nodes of the same vm size. + internal partial interface IVirtualMachineNodesInternal + + { + /// Number of nodes. + int? Count { get; set; } + /// The VM size of the agents used to host this group of nodes. + string Size { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachineNodes.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachineNodes.json.cs new file mode 100644 index 000000000000..c9c37686a748 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachineNodes.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Current status on a group of nodes of the same vm size. + public partial class VirtualMachineNodes + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodes. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodes. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachineNodes FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new VirtualMachineNodes(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._size)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._size.ToString()) : null, "size" ,container.Add ); + AddIf( null != this._count ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._count) : null, "count" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal VirtualMachineNodes(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_size = If( json?.PropertyT("size"), out var __jsonSize) ? (string)__jsonSize : (string)_size;} + {_count = If( json?.PropertyT("count"), out var __jsonCount) ? (int?)__jsonCount : _count;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachinesProfile.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachinesProfile.PowerShell.cs new file mode 100644 index 000000000000..c4bfd5f93c59 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachinesProfile.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Specifications on VirtualMachines agent pool. + [System.ComponentModel.TypeConverter(typeof(VirtualMachinesProfileTypeConverter))] + public partial class VirtualMachinesProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new VirtualMachinesProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new VirtualMachinesProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal VirtualMachinesProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Scale")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfileInternal)this).Scale = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile) content.GetValueForProperty("Scale",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfileInternal)this).Scale, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScaleProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ScaleManual")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfileInternal)this).ScaleManual = (System.Collections.Generic.List) content.GetValueForProperty("ScaleManual",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfileInternal)this).ScaleManual, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManualScaleProfileTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal VirtualMachinesProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Scale")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfileInternal)this).Scale = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile) content.GetValueForProperty("Scale",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfileInternal)this).Scale, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScaleProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ScaleManual")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfileInternal)this).ScaleManual = (System.Collections.Generic.List) content.GetValueForProperty("ScaleManual",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfileInternal)this).ScaleManual, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManualScaleProfileTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + } + /// Specifications on VirtualMachines agent pool. + [System.ComponentModel.TypeConverter(typeof(VirtualMachinesProfileTypeConverter))] + public partial interface IVirtualMachinesProfile + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachinesProfile.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachinesProfile.TypeConverter.cs new file mode 100644 index 000000000000..ac3d79cdfa6f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachinesProfile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class VirtualMachinesProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return VirtualMachinesProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return VirtualMachinesProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return VirtualMachinesProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachinesProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachinesProfile.cs new file mode 100644 index 000000000000..8ffc375477a1 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachinesProfile.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Specifications on VirtualMachines agent pool. + public partial class VirtualMachinesProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfileInternal + { + + /// Internal Acessors for Scale + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfileInternal.Scale { get => (this._scale = this._scale ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScaleProfile()); set { {_scale = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile _scale; + + /// Specifications on how to scale a VirtualMachines agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile Scale { get => (this._scale = this._scale ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScaleProfile()); set => this._scale = value; } + + /// Specifications on how to scale the VirtualMachines agent pool to a fixed size. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ScaleManual { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfileInternal)Scale).Manual; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfileInternal)Scale).Manual = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public VirtualMachinesProfile() + { + + } + } + /// Specifications on VirtualMachines agent pool. + public partial interface IVirtualMachinesProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Specifications on how to scale the VirtualMachines agent pool to a fixed size. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifications on how to scale the VirtualMachines agent pool to a fixed size.", + SerializedName = @"manual", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManualScaleProfile) })] + System.Collections.Generic.List ScaleManual { get; set; } + + } + /// Specifications on VirtualMachines agent pool. + internal partial interface IVirtualMachinesProfileInternal + + { + /// Specifications on how to scale a VirtualMachines agent pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IScaleProfile Scale { get; set; } + /// Specifications on how to scale the VirtualMachines agent pool to a fixed size. + System.Collections.Generic.List ScaleManual { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachinesProfile.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachinesProfile.json.cs new file mode 100644 index 000000000000..da17fc3e6f31 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/VirtualMachinesProfile.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Specifications on VirtualMachines agent pool. + public partial class VirtualMachinesProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IVirtualMachinesProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new VirtualMachinesProfile(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._scale ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._scale.ToJson(null,serializationMode) : null, "scale" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal VirtualMachinesProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_scale = If( json?.PropertyT("scale"), out var __jsonScale) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ScaleProfile.FromJson(__jsonScale) : _scale;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/WeeklySchedule.PowerShell.cs b/generated/Aks/Aks.Autorest/generated/api/Models/WeeklySchedule.PowerShell.cs new file mode 100644 index 000000000000..4e843e7883f5 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/WeeklySchedule.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + [System.ComponentModel.TypeConverter(typeof(WeeklyScheduleTypeConverter))] + public partial class WeeklySchedule + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new WeeklySchedule(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new WeeklySchedule(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal WeeklySchedule(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IntervalWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklyScheduleInternal)this).IntervalWeek = (int) content.GetValueForProperty("IntervalWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklyScheduleInternal)this).IntervalWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklyScheduleInternal)this).DayOfWeek = (string) content.GetValueForProperty("DayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklyScheduleInternal)this).DayOfWeek, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal WeeklySchedule(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IntervalWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklyScheduleInternal)this).IntervalWeek = (int) content.GetValueForProperty("IntervalWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklyScheduleInternal)this).IntervalWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklyScheduleInternal)this).DayOfWeek = (string) content.GetValueForProperty("DayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklyScheduleInternal)this).DayOfWeek, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + [System.ComponentModel.TypeConverter(typeof(WeeklyScheduleTypeConverter))] + public partial interface IWeeklySchedule + + { + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/CloudErrorBody.TypeConverter.cs b/generated/Aks/Aks.Autorest/generated/api/Models/WeeklySchedule.TypeConverter.cs similarity index 89% rename from generated/Aks/Aks.Autorest/generated/api/Models/CloudErrorBody.TypeConverter.cs rename to generated/Aks/Aks.Autorest/generated/api/Models/WeeklySchedule.TypeConverter.cs index f5865cf87732..0b55001df4d2 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/CloudErrorBody.TypeConverter.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/WeeklySchedule.TypeConverter.cs @@ -8,9 +8,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class CloudErrorBodyTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class WeeklyScheduleTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class CloudErrorBodyTypeConverter : global::System.Management.Aut public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// not used by this TypeConverter. /// when set to true, will ignore the case when converting. /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter into an instance of + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule).IsAssignableFrom(type)) { return sourceValue; } try { - return CloudErrorBody.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return WeeklySchedule.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudErrorBody Conv } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return CloudErrorBody.DeserializeFromPSObject(sourceValue); + return WeeklySchedule.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return CloudErrorBody.DeserializeFromDictionary(sourceValue); + return WeeklySchedule.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/WeeklySchedule.cs b/generated/Aks/Aks.Autorest/generated/api/Models/WeeklySchedule.cs new file mode 100644 index 000000000000..0b2e45438916 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/WeeklySchedule.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + public partial class WeeklySchedule : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklyScheduleInternal + { + + /// Backing field for property. + private string _dayOfWeek; + + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string DayOfWeek { get => this._dayOfWeek; set => this._dayOfWeek = value; } + + /// Backing field for property. + private int _intervalWeek; + + /// Specifies the number of weeks between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int IntervalWeek { get => this._intervalWeek; set => this._intervalWeek = value; } + + /// Creates an new instance. + public WeeklySchedule() + { + + } + } + /// For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + public partial interface IWeeklySchedule : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Specifies on which day of the week the maintenance occurs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string DayOfWeek { get; set; } + /// Specifies the number of weeks between each set of occurrences. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of weeks between each set of occurrences.", + SerializedName = @"intervalWeeks", + PossibleTypes = new [] { typeof(int) })] + int IntervalWeek { get; set; } + + } + /// For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + internal partial interface IWeeklyScheduleInternal + + { + /// Specifies on which day of the week the maintenance occurs. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + string DayOfWeek { get; set; } + /// Specifies the number of weeks between each set of occurrences. + int IntervalWeek { get; set; } + + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/WeeklySchedule.json.cs b/generated/Aks/Aks.Autorest/generated/api/Models/WeeklySchedule.json.cs new file mode 100644 index 000000000000..b053180db370 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/api/Models/WeeklySchedule.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + public partial class WeeklySchedule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IWeeklySchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new WeeklySchedule(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber(this._intervalWeek), "intervalWeeks" ,container.Add ); + AddIf( null != (((object)this._dayOfWeek)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._dayOfWeek.ToString()) : null, "dayOfWeek" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal WeeklySchedule(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_intervalWeek = If( json?.PropertyT("intervalWeeks"), out var __jsonIntervalWeeks) ? (int)__jsonIntervalWeeks : _intervalWeek;} + {_dayOfWeek = If( json?.PropertyT("dayOfWeek"), out var __jsonDayOfWeek) ? (string)__jsonDayOfWeek : (string)_dayOfWeek;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/api/Models/WindowsGmsaProfile.cs b/generated/Aks/Aks.Autorest/generated/api/Models/WindowsGmsaProfile.cs index bbccd5308192..f6dd7c0b9899 100644 --- a/generated/Aks/Aks.Autorest/generated/api/Models/WindowsGmsaProfile.cs +++ b/generated/Aks/Aks.Autorest/generated/api/Models/WindowsGmsaProfile.cs @@ -26,7 +26,9 @@ public partial class WindowsGmsaProfile : /// Backing field for property. private bool? _enabled; - /// Specifies whether to enable Windows gMSA in the managed cluster. + /// + /// Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public bool? Enabled { get => this._enabled; set => this._enabled = value; } @@ -64,14 +66,16 @@ public partial interface IWindowsGmsaProfile : SerializedName = @"dnsServer", PossibleTypes = new [] { typeof(string) })] string DnsServer { get; set; } - /// Specifies whether to enable Windows gMSA in the managed cluster. + /// + /// Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Specifies whether to enable Windows gMSA in the managed cluster.", + Description = @"Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster.", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] bool? Enabled { get; set; } @@ -100,7 +104,9 @@ internal partial interface IWindowsGmsaProfileInternal /// which is used to create the managed cluster. /// string DnsServer { get; set; } - /// Specifies whether to enable Windows gMSA in the managed cluster. + /// + /// Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster. + /// bool? Enabled { get; set; } /// /// Specifies the root domain name for Windows gMSA.

Set it to empty if you have configured the DNS server in the diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksContainerServiceOrchestrator_List.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksContainerServiceOrchestrator_List.cs index 3e68d380f3ec..a8975fbc9347 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksContainerServiceOrchestrator_List.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksContainerServiceOrchestrator_List.cs @@ -152,12 +152,12 @@ public partial class GetAzAksContainerServiceOrchestrator_List : global::System. /// Backing field for property. private string[] _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_Get.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_Get.cs new file mode 100644 index 000000000000..aeaa644d9566 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_Get.cs @@ -0,0 +1,536 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Get a specific machine in the specified agent pool. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksMachine_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Get a specific machine in the specified agent pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}", ApiVersion = "2025-08-01")] + public partial class GetAzAksMachine_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _agentPoolName; + + /// The name of the agent pool. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the agent pool.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the agent pool.", + SerializedName = @"agentPoolName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string AgentPoolName { get => this._agentPoolName; set => this._agentPoolName = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// host name of the machine + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "host name of the machine")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"host name of the machine", + SerializedName = @"machineName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("MachineName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzAksMachine_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.MachinesGet(SubscriptionId, ResourceGroupName, ResourceName, AgentPoolName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName,AgentPoolName=AgentPoolName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_GetViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_GetViaIdentity.cs new file mode 100644 index 000000000000..b85c47000aa9 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_GetViaIdentity.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Get a specific machine in the specified agent pool. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksMachine_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Get a specific machine in the specified agent pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}", ApiVersion = "2025-08-01")] + public partial class GetAzAksMachine_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzAksMachine_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.MachinesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.AgentPoolName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AgentPoolName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.MachineName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.MachineName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.MachinesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.AgentPoolName ?? null, InputObject.MachineName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_GetViaIdentityAgentPool.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_GetViaIdentityAgentPool.cs new file mode 100644 index 000000000000..e9cbd22edbd1 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_GetViaIdentityAgentPool.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Get a specific machine in the specified agent pool. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksMachine_GetViaIdentityAgentPool")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Get a specific machine in the specified agent pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}", ApiVersion = "2025-08-01")] + public partial class GetAzAksMachine_GetViaIdentityAgentPool : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _agentPoolInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity AgentPoolInputObject { get => this._agentPoolInputObject; set => this._agentPoolInputObject = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// host name of the machine + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "host name of the machine")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"host name of the machine", + SerializedName = @"machineName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("MachineName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzAksMachine_GetViaIdentityAgentPool() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (AgentPoolInputObject?.Id != null) + { + this.AgentPoolInputObject.Id += $"/machines/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.MachinesGetViaIdentity(AgentPoolInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == AgentPoolInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("AgentPoolInputObject has null value for AgentPoolInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, AgentPoolInputObject) ); + } + if (null == AgentPoolInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("AgentPoolInputObject has null value for AgentPoolInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, AgentPoolInputObject) ); + } + if (null == AgentPoolInputObject.ResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("AgentPoolInputObject has null value for AgentPoolInputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, AgentPoolInputObject) ); + } + if (null == AgentPoolInputObject.AgentPoolName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("AgentPoolInputObject has null value for AgentPoolInputObject.AgentPoolName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, AgentPoolInputObject) ); + } + await this.Client.MachinesGet(AgentPoolInputObject.SubscriptionId ?? null, AgentPoolInputObject.ResourceGroupName ?? null, AgentPoolInputObject.ResourceName ?? null, AgentPoolInputObject.AgentPoolName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_GetViaIdentityManagedCluster.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_GetViaIdentityManagedCluster.cs new file mode 100644 index 000000000000..a710430c5617 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_GetViaIdentityManagedCluster.cs @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Get a specific machine in the specified agent pool. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksMachine_GetViaIdentityManagedCluster")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Get a specific machine in the specified agent pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}", ApiVersion = "2025-08-01")] + public partial class GetAzAksMachine_GetViaIdentityManagedCluster : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _agentPoolName; + + /// The name of the agent pool. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the agent pool.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the agent pool.", + SerializedName = @"agentPoolName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string AgentPoolName { get => this._agentPoolName; set => this._agentPoolName = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _managedClusterInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity ManagedClusterInputObject { get => this._managedClusterInputObject; set => this._managedClusterInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// host name of the machine + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "host name of the machine")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"host name of the machine", + SerializedName = @"machineName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("MachineName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzAksMachine_GetViaIdentityManagedCluster() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ManagedClusterInputObject?.Id != null) + { + this.ManagedClusterInputObject.Id += $"/agentPools/{(global::System.Uri.EscapeDataString(this.AgentPoolName.ToString()))}/machines/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.MachinesGetViaIdentity(ManagedClusterInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ManagedClusterInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + if (null == ManagedClusterInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + if (null == ManagedClusterInputObject.ResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + await this.Client.MachinesGet(ManagedClusterInputObject.SubscriptionId ?? null, ManagedClusterInputObject.ResourceGroupName ?? null, ManagedClusterInputObject.ResourceName ?? null, AgentPoolName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { AgentPoolName=AgentPoolName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_List.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_List.cs new file mode 100644 index 000000000000..613bfa263aaf --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMachine_List.cs @@ -0,0 +1,548 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Gets a list of machines in the specified agent pool. + /// + /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksMachine_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachine))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets a list of machines in the specified agent pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines", ApiVersion = "2025-08-01")] + public partial class GetAzAksMachine_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _agentPoolName; + + /// The name of the agent pool. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the agent pool.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the agent pool.", + SerializedName = @"agentPoolName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string AgentPoolName { get => this._agentPoolName; set => this._agentPoolName = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzAksMachine_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.MachinesList(SubscriptionId, ResourceGroupName, ResourceName, AgentPoolName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName,AgentPoolName=AgentPoolName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMachineListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.MachinesList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_Get.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_Get.cs index 57acb564c8fe..7fa19d8bec94 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_Get.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the specified maintenance configuration of a managed cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2025-08-01")] public partial class GetAzAksMaintenanceConfiguration_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -162,12 +162,12 @@ public partial class GetAzAksMaintenanceConfiguration_Get : global::System.Manag /// Backing field for property. private string[] _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -183,12 +183,12 @@ public partial class GetAzAksMaintenanceConfiguration_Get : global::System.Manag /// happens on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -438,12 +438,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -460,7 +460,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_GetViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_GetViaIdentity.cs index f8d7c0390c07..6ea275317a75 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_GetViaIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the specified maintenance configuration of a managed cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2025-08-01")] public partial class GetAzAksMaintenanceConfiguration_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -130,12 +130,12 @@ public partial class GetAzAksMaintenanceConfiguration_GetViaIdentity : global::S /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -406,12 +406,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -428,7 +428,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_GetViaIdentityManagedCluster.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_GetViaIdentityManagedCluster.cs index e3234952d31c..245198b529c5 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_GetViaIdentityManagedCluster.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_GetViaIdentityManagedCluster.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the specified maintenance configuration of a managed cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2025-08-01")] public partial class GetAzAksMaintenanceConfiguration_GetViaIdentityManagedCluster : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -144,12 +144,12 @@ public partial class GetAzAksMaintenanceConfiguration_GetViaIdentityManagedClust /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -418,12 +418,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -440,7 +440,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_List.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_List.cs index d314ab9f01e1..333c6d574f5a 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_List.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets a list of maintenance configurations in the specified managed cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations", ApiVersion = "2025-08-01")] public partial class GetAzAksMaintenanceConfiguration_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -154,12 +154,12 @@ public partial class GetAzAksMaintenanceConfiguration_List : global::System.Mana /// Backing field for property. private string[] _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -175,12 +175,12 @@ public partial class GetAzAksMaintenanceConfiguration_List : global::System.Mana /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -430,12 +430,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -452,7 +452,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_Get.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_Get.cs index 85beddc07cc1..d03ae5b226bf 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_Get.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the results of a command which has been run on the Managed Cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}", ApiVersion = "2025-08-01")] public partial class GetAzAksManagedClusterCommandResult_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -169,12 +169,12 @@ public partial class GetAzAksManagedClusterCommandResult_Get : global::System.Ma /// Backing field for property. private string[] _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -200,12 +200,12 @@ public partial class GetAzAksManagedClusterCommandResult_Get : global::System.Ma /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -468,7 +468,7 @@ protected override void StopProcessing() return ; } // onAccepted - response for 202 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -479,12 +479,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -501,7 +501,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_GetViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_GetViaIdentity.cs index a581a70ed663..3eb2617ac50b 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_GetViaIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the results of a command which has been run on the Managed Cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}", ApiVersion = "2025-08-01")] public partial class GetAzAksManagedClusterCommandResult_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -147,12 +147,12 @@ public partial class GetAzAksManagedClusterCommandResult_GetViaIdentity : global /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -436,7 +436,7 @@ protected override void StopProcessing() return ; } // onAccepted - response for 202 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -447,12 +447,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -469,7 +469,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_GetViaIdentityManagedCluster.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_GetViaIdentityManagedCluster.cs index 4cf21ca7e2bc..6c634de1f208 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_GetViaIdentityManagedCluster.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_GetViaIdentityManagedCluster.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the results of a command which has been run on the Managed Cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}", ApiVersion = "2025-08-01")] public partial class GetAzAksManagedClusterCommandResult_GetViaIdentityManagedCluster : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -161,12 +161,12 @@ public partial class GetAzAksManagedClusterCommandResult_GetViaIdentityManagedCl /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -448,7 +448,7 @@ protected override void StopProcessing() return ; } // onAccepted - response for 202 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -459,12 +459,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -481,7 +481,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterKuberneteVersion_List.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterKuberneteVersion_List.cs new file mode 100644 index 000000000000..76dd2aa65a1a --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterKuberneteVersion_List.cs @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// + /// Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details + /// on preview status of the version + /// + /// + /// [OpenAPI] ListKubernetesVersions=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/kubernetesVersions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksManagedClusterKuberneteVersion_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/kubernetesVersions", ApiVersion = "2025-08-01")] + public partial class GetAzAksManagedClusterKuberneteVersion_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzAksManagedClusterKuberneteVersion_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ManagedClustersListKubernetesVersions(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IKubernetesVersionListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // nested-array / values / + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOSOption_Get.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshRevisionProfile_Get.cs similarity index 90% rename from generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOSOption_Get.cs rename to generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshRevisionProfile_Get.cs index 358f92d57ca8..17f9ba028227 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOSOption_Get.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshRevisionProfile_Get.cs @@ -10,16 +10,18 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; using System; - /// Gets supported OS options in the specified subscription. + /// + /// Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades + /// /// - /// [OpenAPI] GetOSOptions=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default" + /// [OpenAPI] GetMeshRevisionProfile=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}" /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksManagedClusterOSOption_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets supported OS options in the specified subscription.")] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksManagedClusterMeshRevisionProfile_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default", ApiVersion = "2023-02-01")] - public partial class GetAzAksManagedClusterOSOption_Get : global::System.Management.Automation.PSCmdlet, + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}", ApiVersion = "2025-08-01")] + public partial class GetAzAksManagedClusterMeshRevisionProfile_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext { @@ -91,12 +93,12 @@ public partial class GetAzAksManagedClusterOSOption_Get : global::System.Managem /// Backing field for property. private string _location; - /// The name of Azure region. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of Azure region.")] + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name of Azure region.", + Description = @"The name of the Azure region.", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] @@ -110,6 +112,20 @@ public partial class GetAzAksManagedClusterOSOption_Get : global::System.Managem /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + /// Backing field for property. + private string _mode; + + /// The mode of the mesh. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The mode of the mesh.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The mode of the mesh.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Mode { get => this._mode; set => this._mode = value; } + /// /// The instance of the that the remote call will use. /// @@ -131,29 +147,15 @@ public partial class GetAzAksManagedClusterOSOption_Get : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - /// Backing field for property. - private string _resourceType; - - /// The resource type for which the OS options needs to be returned - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The resource type for which the OS options needs to be returned")] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The resource type for which the OS options needs to be returned", - SerializedName = @"resource-type", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Query)] - public string ResourceType { get => this._resourceType; set => this._resourceType = value; } - /// Backing field for property. private string[] _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -169,24 +171,24 @@ public partial class GetAzAksManagedClusterOSOption_Get : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -235,9 +237,9 @@ protected override void EndProcessing() } /// - /// Initializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// - public GetAzAksManagedClusterOSOption_Get() + public GetAzAksManagedClusterMeshRevisionProfile_Get() { } @@ -380,13 +382,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ManagedClustersGetOSOptions(SubscriptionId, Location, this.InvocationInformation.BoundParameters.ContainsKey("ResourceType") ? ResourceType : null, onOk, onDefault, this, Pipeline); + await this.Client.ManagedClustersGetMeshRevisionProfile(SubscriptionId, Location, Mode, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,ResourceType=this.InvocationInformation.BoundParameters.ContainsKey("ResourceType") ? ResourceType : null}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Mode=Mode}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -424,12 +426,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -446,7 +448,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -464,12 +466,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -481,7 +483,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile var result = (await response); if (null != result) { diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOSOption_GetViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshRevisionProfile_GetViaIdentity.cs similarity index 90% rename from generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOSOption_GetViaIdentity.cs rename to generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshRevisionProfile_GetViaIdentity.cs index e4532aa65401..7c083c1f7700 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOSOption_GetViaIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshRevisionProfile_GetViaIdentity.cs @@ -10,16 +10,18 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; using System; - /// Gets supported OS options in the specified subscription. + /// + /// Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades + /// /// - /// [OpenAPI] GetOSOptions=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default" + /// [OpenAPI] GetMeshRevisionProfile=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}" /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksManagedClusterOSOption_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets supported OS options in the specified subscription.")] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksManagedClusterMeshRevisionProfile_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default", ApiVersion = "2023-02-01")] - public partial class GetAzAksManagedClusterOSOption_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}", ApiVersion = "2025-08-01")] + public partial class GetAzAksManagedClusterMeshRevisionProfile_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext { @@ -125,43 +127,29 @@ public partial class GetAzAksManagedClusterOSOption_GetViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - /// Backing field for property. - private string _resourceType; - - /// The resource type for which the OS options needs to be returned - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The resource type for which the OS options needs to be returned")] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The resource type for which the OS options needs to be returned", - SerializedName = @"resource-type", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Query)] - public string ResourceType { get => this._resourceType; set => this._resourceType = value; } - /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -210,9 +198,9 @@ protected override void EndProcessing() } /// - /// Initializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// - public GetAzAksManagedClusterOSOption_GetViaIdentity() + public GetAzAksManagedClusterMeshRevisionProfile_GetViaIdentity() { } @@ -355,7 +343,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.ManagedClustersGetOSOptionsViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("ResourceType") ? ResourceType : null, onOk, onDefault, this, Pipeline); + await this.Client.ManagedClustersGetMeshRevisionProfileViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); } else { @@ -368,13 +356,17 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.ManagedClustersGetOSOptions(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, this.InvocationInformation.BoundParameters.ContainsKey("ResourceType") ? ResourceType : null, onOk, onDefault, this, Pipeline); + if (null == InputObject.Mode) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Mode"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ManagedClustersGetMeshRevisionProfile(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Mode ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceType=this.InvocationInformation.BoundParameters.ContainsKey("ResourceType") ? ResourceType : null}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -412,12 +404,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -434,7 +426,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -452,12 +444,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -469,7 +461,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile var result = (await response); if (null != result) { diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshRevisionProfile_GetViaIdentityLocation.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshRevisionProfile_GetViaIdentityLocation.cs new file mode 100644 index 000000000000..68f34bc02e2b --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshRevisionProfile_GetViaIdentityLocation.cs @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// + /// Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades + /// + /// + /// [OpenAPI] GetMeshRevisionProfile=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksManagedClusterMeshRevisionProfile_GetViaIdentityLocation")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}", ApiVersion = "2025-08-01")] + public partial class GetAzAksManagedClusterMeshRevisionProfile_GetViaIdentityLocation : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _locationInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity LocationInputObject { get => this._locationInputObject; set => this._locationInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _mode; + + /// The mode of the mesh. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The mode of the mesh.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The mode of the mesh.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Mode { get => this._mode; set => this._mode = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public GetAzAksManagedClusterMeshRevisionProfile_GetViaIdentityLocation() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (LocationInputObject?.Id != null) + { + this.LocationInputObject.Id += $"/meshRevisionProfiles/{(global::System.Uri.EscapeDataString(this.Mode.ToString()))}"; + await this.Client.ManagedClustersGetMeshRevisionProfileViaIdentity(LocationInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == LocationInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + if (null == LocationInputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + await this.Client.ManagedClustersGetMeshRevisionProfile(LocationInputObject.SubscriptionId ?? null, LocationInputObject.Location ?? null, Mode, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Mode=Mode}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshRevisionProfile_List.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshRevisionProfile_List.cs new file mode 100644 index 000000000000..3ee857bd6227 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshRevisionProfile_List.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// + /// Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades + /// + /// + /// [OpenAPI] ListMeshRevisionProfiles=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksManagedClusterMeshRevisionProfile_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles", ApiVersion = "2025-08-01")] + public partial class GetAzAksManagedClusterMeshRevisionProfile_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileList + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzAksManagedClusterMeshRevisionProfile_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ManagedClustersListMeshRevisionProfiles(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileList + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshRevisionProfileList + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ManagedClustersListMeshRevisionProfiles_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshUpgradeProfile_Get.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshUpgradeProfile_Get.cs new file mode 100644 index 000000000000..d842efd755be --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshUpgradeProfile_Get.cs @@ -0,0 +1,521 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Gets available upgrades for a service mesh in a cluster. + /// + /// [OpenAPI] GetMeshUpgradeProfile=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksManagedClusterMeshUpgradeProfile_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets available upgrades for a service mesh in a cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}", ApiVersion = "2025-08-01")] + public partial class GetAzAksManagedClusterMeshUpgradeProfile_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _mode; + + /// The mode of the mesh. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The mode of the mesh.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The mode of the mesh.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Mode { get => this._mode; set => this._mode = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzAksManagedClusterMeshUpgradeProfile_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ManagedClustersGetMeshUpgradeProfile(SubscriptionId, ResourceGroupName, ResourceName, Mode, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName,Mode=Mode}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshUpgradeProfile_GetViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshUpgradeProfile_GetViaIdentity.cs new file mode 100644 index 000000000000..00d037e13193 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshUpgradeProfile_GetViaIdentity.cs @@ -0,0 +1,489 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Gets available upgrades for a service mesh in a cluster. + /// + /// [OpenAPI] GetMeshUpgradeProfile=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksManagedClusterMeshUpgradeProfile_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets available upgrades for a service mesh in a cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}", ApiVersion = "2025-08-01")] + public partial class GetAzAksManagedClusterMeshUpgradeProfile_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzAksManagedClusterMeshUpgradeProfile_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ManagedClustersGetMeshUpgradeProfileViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Mode) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Mode"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ManagedClustersGetMeshUpgradeProfile(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.Mode ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshUpgradeProfile_GetViaIdentityManagedCluster.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshUpgradeProfile_GetViaIdentityManagedCluster.cs new file mode 100644 index 000000000000..c49e97a92ca7 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshUpgradeProfile_GetViaIdentityManagedCluster.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Gets available upgrades for a service mesh in a cluster. + /// + /// [OpenAPI] GetMeshUpgradeProfile=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksManagedClusterMeshUpgradeProfile_GetViaIdentityManagedCluster")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets available upgrades for a service mesh in a cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}", ApiVersion = "2025-08-01")] + public partial class GetAzAksManagedClusterMeshUpgradeProfile_GetViaIdentityManagedCluster : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _managedClusterInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity ManagedClusterInputObject { get => this._managedClusterInputObject; set => this._managedClusterInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _mode; + + /// The mode of the mesh. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The mode of the mesh.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The mode of the mesh.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Mode { get => this._mode; set => this._mode = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public GetAzAksManagedClusterMeshUpgradeProfile_GetViaIdentityManagedCluster() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ManagedClusterInputObject?.Id != null) + { + this.ManagedClusterInputObject.Id += $"/meshUpgradeProfiles/{(global::System.Uri.EscapeDataString(this.Mode.ToString()))}"; + await this.Client.ManagedClustersGetMeshUpgradeProfileViaIdentity(ManagedClusterInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ManagedClusterInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + if (null == ManagedClusterInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + if (null == ManagedClusterInputObject.ResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + await this.Client.ManagedClustersGetMeshUpgradeProfile(ManagedClusterInputObject.SubscriptionId ?? null, ManagedClusterInputObject.ResourceGroupName ?? null, ManagedClusterInputObject.ResourceName ?? null, Mode, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Mode=Mode}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshUpgradeProfile_List.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshUpgradeProfile_List.cs new file mode 100644 index 000000000000..12b78276b83b --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterMeshUpgradeProfile_List.cs @@ -0,0 +1,534 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Lists available upgrades for all service meshes in a specific cluster. + /// + /// [OpenAPI] ListMeshUpgradeProfiles=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksManagedClusterMeshUpgradeProfile_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Lists available upgrades for all service meshes in a specific cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles", ApiVersion = "2025-08-01")] + public partial class GetAzAksManagedClusterMeshUpgradeProfile_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileList + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzAksManagedClusterMeshUpgradeProfile_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ManagedClustersListMeshUpgradeProfiles(SubscriptionId, ResourceGroupName, ResourceName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileList + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMeshUpgradeProfileList + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ManagedClustersListMeshUpgradeProfiles_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOutboundNetworkDependencyEndpoint_List.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOutboundNetworkDependencyEndpoint_List.cs index 32b594bc9799..f11afa9714d4 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOutboundNetworkDependencyEndpoint_List.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOutboundNetworkDependencyEndpoint_List.cs @@ -21,7 +21,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOutboundEnvironmentEndpoint))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints", ApiVersion = "2025-08-01")] public partial class GetAzAksManagedClusterOutboundNetworkDependencyEndpoint_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -157,12 +157,12 @@ public partial class GetAzAksManagedClusterOutboundNetworkDependencyEndpoint_Lis /// Backing field for property. private string[] _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -178,12 +178,12 @@ public partial class GetAzAksManagedClusterOutboundNetworkDependencyEndpoint_Lis /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -433,12 +433,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -455,7 +455,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_Get.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_Get.cs index 744596951f6b..ed3e549bf11f 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_Get.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeProfile))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the upgrade profile for an agent pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", ApiVersion = "2025-08-01")] public partial class GetAzAksNodePoolUpgradeProfile_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -163,12 +163,12 @@ public partial class GetAzAksNodePoolUpgradeProfile_Get : global::System.Managem /// Backing field for property. private string[] _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -184,12 +184,12 @@ public partial class GetAzAksNodePoolUpgradeProfile_Get : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -439,12 +439,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -461,7 +461,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_GetViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_GetViaIdentity.cs index ce952c5b8ae3..da16ad18809e 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_GetViaIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeProfile))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the upgrade profile for an agent pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", ApiVersion = "2025-08-01")] public partial class GetAzAksNodePoolUpgradeProfile_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -130,12 +130,12 @@ public partial class GetAzAksNodePoolUpgradeProfile_GetViaIdentity : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -406,12 +406,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -428,7 +428,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_GetViaIdentityManagedCluster.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_GetViaIdentityManagedCluster.cs index fa310062a844..ec45fc7577a1 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_GetViaIdentityManagedCluster.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_GetViaIdentityManagedCluster.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeProfile))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the upgrade profile for an agent pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", ApiVersion = "2025-08-01")] public partial class GetAzAksNodePoolUpgradeProfile_GetViaIdentityManagedCluster : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -145,12 +145,12 @@ public partial class GetAzAksNodePoolUpgradeProfile_GetViaIdentityManagedCluster /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -418,12 +418,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -440,7 +440,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksOperation_List.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksOperation_List.cs index 24455a9234b4..6cf74836e7f9 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksOperation_List.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksOperation_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOperationValue))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets a list of operations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/providers/Microsoft.ContainerService/operations", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/providers/Microsoft.ContainerService/operations", ApiVersion = "2025-08-01")] public partial class GetAzAksOperation_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -123,12 +123,12 @@ public partial class GetAzAksOperation_List : global::System.Management.Automati /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -375,12 +375,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -397,7 +397,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_Get.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_Get.cs index d6a464d1e511..7865db126642 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_Get.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets a snapshot.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", ApiVersion = "2025-08-01")] public partial class GetAzAksSnapshot_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -148,12 +148,12 @@ public partial class GetAzAksSnapshot_Get : global::System.Management.Automation /// Backing field for property. private string[] _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -169,12 +169,12 @@ public partial class GetAzAksSnapshot_Get : global::System.Management.Automation /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -424,12 +424,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -446,7 +446,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_GetViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_GetViaIdentity.cs index 14506cd99c44..c5a76cf1f0b7 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_GetViaIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets a snapshot.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", ApiVersion = "2025-08-01")] public partial class GetAzAksSnapshot_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -130,12 +130,12 @@ public partial class GetAzAksSnapshot_GetViaIdentity : global::System.Management /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -402,12 +402,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -424,7 +424,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List.cs index b3810e9cbcb1..5ef4914c136d 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets a list of snapshots in the specified subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots", ApiVersion = "2025-08-01")] public partial class GetAzAksSnapshot_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -126,12 +126,12 @@ public partial class GetAzAksSnapshot_List : global::System.Management.Automatio /// Backing field for property. private string[] _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -147,12 +147,12 @@ public partial class GetAzAksSnapshot_List : global::System.Management.Automatio /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -402,12 +402,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -424,7 +424,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List1.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List1.cs index 3d098ed3adf5..8151e9ccea6b 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List1.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List1.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Lists snapshots in the specified subscription and resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots", ApiVersion = "2025-08-01")] public partial class GetAzAksSnapshot_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -140,12 +140,12 @@ public partial class GetAzAksSnapshot_List1 : global::System.Management.Automati /// Backing field for property. private string[] _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -161,12 +161,12 @@ public partial class GetAzAksSnapshot_List1 : global::System.Management.Automati /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -416,12 +416,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,7 +438,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRoleBinding_Get.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRoleBinding_Get.cs new file mode 100644 index 000000000000..284b61c89275 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRoleBinding_Get.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Get a trusted access role binding. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksTrustedAccessRoleBinding_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Get a trusted access role binding.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", ApiVersion = "2025-08-01")] + public partial class GetAzAksTrustedAccessRoleBinding_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of trusted access role binding. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of trusted access role binding.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of trusted access role binding.", + SerializedName = @"trustedAccessRoleBindingName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TrustedAccessRoleBindingName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzAksTrustedAccessRoleBinding_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TrustedAccessRoleBindingsGet(SubscriptionId, ResourceGroupName, ResourceName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRoleBinding_GetViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRoleBinding_GetViaIdentity.cs new file mode 100644 index 000000000000..73267bd86307 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRoleBinding_GetViaIdentity.cs @@ -0,0 +1,489 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Get a trusted access role binding. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksTrustedAccessRoleBinding_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Get a trusted access role binding.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", ApiVersion = "2025-08-01")] + public partial class GetAzAksTrustedAccessRoleBinding_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzAksTrustedAccessRoleBinding_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.TrustedAccessRoleBindingsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.TrustedAccessRoleBindingName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.TrustedAccessRoleBindingName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.TrustedAccessRoleBindingsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.TrustedAccessRoleBindingName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRoleBinding_GetViaIdentityManagedCluster.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRoleBinding_GetViaIdentityManagedCluster.cs new file mode 100644 index 000000000000..e757484ef2f9 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRoleBinding_GetViaIdentityManagedCluster.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Get a trusted access role binding. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksTrustedAccessRoleBinding_GetViaIdentityManagedCluster")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Get a trusted access role binding.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", ApiVersion = "2025-08-01")] + public partial class GetAzAksTrustedAccessRoleBinding_GetViaIdentityManagedCluster : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _managedClusterInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity ManagedClusterInputObject { get => this._managedClusterInputObject; set => this._managedClusterInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of trusted access role binding. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of trusted access role binding.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of trusted access role binding.", + SerializedName = @"trustedAccessRoleBindingName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TrustedAccessRoleBindingName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public GetAzAksTrustedAccessRoleBinding_GetViaIdentityManagedCluster() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ManagedClusterInputObject?.Id != null) + { + this.ManagedClusterInputObject.Id += $"/trustedAccessRoleBindings/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TrustedAccessRoleBindingsGetViaIdentity(ManagedClusterInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ManagedClusterInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + if (null == ManagedClusterInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + if (null == ManagedClusterInputObject.ResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + await this.Client.TrustedAccessRoleBindingsGet(ManagedClusterInputObject.SubscriptionId ?? null, ManagedClusterInputObject.ResourceGroupName ?? null, ManagedClusterInputObject.ResourceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRoleBinding_List.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRoleBinding_List.cs new file mode 100644 index 000000000000..8eb7e9cddb12 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRoleBinding_List.cs @@ -0,0 +1,534 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// List trusted access role bindings. + /// + /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksTrustedAccessRoleBinding_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"List trusted access role bindings.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings", ApiVersion = "2025-08-01")] + public partial class GetAzAksTrustedAccessRoleBinding_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzAksTrustedAccessRoleBinding_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TrustedAccessRoleBindingsList(SubscriptionId, ResourceGroupName, ResourceName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBindingListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TrustedAccessRoleBindingsList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRole_List.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRole_List.cs new file mode 100644 index 000000000000..91374fb3a47b --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksTrustedAccessRole_List.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// List supported trusted access roles. + /// + /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksTrustedAccessRole_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRole))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"List supported trusted access roles.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles", ApiVersion = "2025-08-01")] + public partial class GetAzAksTrustedAccessRole_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzAksTrustedAccessRole_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TrustedAccessRolesList(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TrustedAccessRolesList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_Get.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_Get.cs index 96246fa977e8..cb1a28c58c2a 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_Get.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterUpgradeProfile))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the upgrade profile of a managed cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", ApiVersion = "2025-08-01")] public partial class GetAzAksUpgradeProfile_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -150,12 +150,12 @@ public partial class GetAzAksUpgradeProfile_Get : global::System.Management.Auto /// Backing field for property. private string[] _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -171,12 +171,12 @@ public partial class GetAzAksUpgradeProfile_Get : global::System.Management.Auto /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -426,12 +426,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -448,7 +448,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_GetViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_GetViaIdentity.cs index 29a1c1d4fcd0..bb3fe53bc5ad 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_GetViaIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterUpgradeProfile))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the upgrade profile of a managed cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", ApiVersion = "2025-08-01")] public partial class GetAzAksUpgradeProfile_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -131,12 +131,12 @@ public partial class GetAzAksUpgradeProfile_GetViaIdentity : global::System.Mana /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -403,12 +403,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -425,7 +425,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_Abort.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_Abort.cs index 533891ab5517..28ad1c86795c 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_Abort.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_Abort.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort", ApiVersion = "2025-08-01")] public partial class InvokeAzAksAbortAgentPoolLatestOperation_Abort : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -44,15 +44,6 @@ public partial class InvokeAzAksAbortAgentPoolLatestOperation_Abort : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _agentPoolName; @@ -186,12 +177,12 @@ public partial class InvokeAzAksAbortAgentPoolLatestOperation_Abort : global::Sy /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -207,12 +198,12 @@ public partial class InvokeAzAksAbortAgentPoolLatestOperation_Abort : global::Sy /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -224,6 +215,16 @@ public partial class InvokeAzAksAbortAgentPoolLatestOperation_Abort : global::Sy partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -269,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.InvokeAzAksAbortAgentPoolL /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -487,7 +483,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.AgentPoolsAbortLatestOperation(SubscriptionId, ResourceGroupName, ResourceName, AgentPoolName, onNoContent, onDefault, this, Pipeline); + await this.Client.AgentPoolsAbortLatestOperation(SubscriptionId, ResourceGroupName, ResourceName, AgentPoolName, onNoContent, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) @@ -530,12 +526,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -552,7 +548,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -585,7 +581,31 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity.cs index 1a921c322961..4f1473af030a 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort", ApiVersion = "2025-08-01")] public partial class InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -44,15 +44,6 @@ public partial class InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -154,12 +145,12 @@ public partial class InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity : /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -171,6 +162,16 @@ public partial class InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity : partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -214,11 +215,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.InvokeAzAksAbortAgentPoolL /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -434,7 +430,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.AgentPoolsAbortLatestOperationViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + await this.Client.AgentPoolsAbortLatestOperationViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); } else { @@ -455,7 +451,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AgentPoolName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.AgentPoolsAbortLatestOperation(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.AgentPoolName ?? null, onNoContent, onDefault, this, Pipeline); + await this.Client.AgentPoolsAbortLatestOperation(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.AgentPoolName ?? null, onNoContent, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -499,12 +495,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -521,7 +517,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -554,7 +550,31 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentityManagedcluster.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentityManagedcluster.cs index 435a02ff4594..644f534de127 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentityManagedcluster.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentityManagedcluster.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort", ApiVersion = "2025-08-01")] public partial class InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentityManagedcluster : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -44,15 +44,6 @@ public partial class InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentityMa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _agentPoolName; @@ -168,12 +159,12 @@ public partial class InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentityMa /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -185,6 +176,16 @@ public partial class InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentityMa partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -229,11 +230,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.InvokeAzAksAbortAgentPoolL /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -451,7 +447,7 @@ protected override void ProcessRecord() if (ManagedclusterInputObject?.Id != null) { this.ManagedclusterInputObject.Id += $"/agentPools/{(global::System.Uri.EscapeDataString(this.AgentPoolName.ToString()))}"; - await this.Client.AgentPoolsAbortLatestOperationViaIdentity(ManagedclusterInputObject.Id, onNoContent, onDefault, this, Pipeline); + await this.Client.AgentPoolsAbortLatestOperationViaIdentity(ManagedclusterInputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); } else { @@ -468,7 +464,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedclusterInputObject has null value for ManagedclusterInputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedclusterInputObject) ); } - await this.Client.AgentPoolsAbortLatestOperation(ManagedclusterInputObject.SubscriptionId ?? null, ManagedclusterInputObject.ResourceGroupName ?? null, ManagedclusterInputObject.ResourceName ?? null, AgentPoolName, onNoContent, onDefault, this, Pipeline); + await this.Client.AgentPoolsAbortLatestOperation(ManagedclusterInputObject.SubscriptionId ?? null, ManagedclusterInputObject.ResourceGroupName ?? null, ManagedclusterInputObject.ResourceName ?? null, AgentPoolName, onNoContent, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -512,12 +508,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -534,7 +530,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -567,7 +563,31 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_Abort.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_Abort.cs index 99c597c4dfa1..e122e092f054 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_Abort.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_Abort.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", ApiVersion = "2025-08-01")] public partial class InvokeAzAksAbortManagedClusterLatestOperation_Abort : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -44,15 +44,6 @@ public partial class InvokeAzAksAbortManagedClusterLatestOperation_Abort : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -172,12 +163,12 @@ public partial class InvokeAzAksAbortManagedClusterLatestOperation_Abort : globa /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -193,12 +184,12 @@ public partial class InvokeAzAksAbortManagedClusterLatestOperation_Abort : globa /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -210,6 +201,16 @@ public partial class InvokeAzAksAbortManagedClusterLatestOperation_Abort : globa partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -254,11 +255,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.InvokeAzAksAbortManagedClu /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -472,7 +468,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ManagedClustersAbortLatestOperation(SubscriptionId, ResourceGroupName, ResourceName, onNoContent, onDefault, this, Pipeline); + await this.Client.ManagedClustersAbortLatestOperation(SubscriptionId, ResourceGroupName, ResourceName, onNoContent, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) @@ -515,12 +511,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -537,7 +533,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -570,7 +566,31 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdentity.cs index 4c5129314828..9f1c47afbe81 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdentity.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", ApiVersion = "2025-08-01")] public partial class InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -44,15 +44,6 @@ public partial class InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdent /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -154,12 +145,12 @@ public partial class InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdent /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -171,6 +162,16 @@ public partial class InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdent partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -214,11 +215,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.InvokeAzAksAbortManagedClu /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -435,7 +431,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.ManagedClustersAbortLatestOperationViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + await this.Client.ManagedClustersAbortLatestOperationViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); } else { @@ -452,7 +448,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.ManagedClustersAbortLatestOperation(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, onNoContent, onDefault, this, Pipeline); + await this.Client.ManagedClustersAbortLatestOperation(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, onNoContent, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -496,12 +492,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -518,7 +514,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -551,7 +547,31 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rotate.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rotate.cs index 3cb5cb2be477..90510b2b7906 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rotate.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rotate.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Rotates the service account signing keys of a managed cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys", ApiVersion = "2025-08-01")] public partial class InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rotate : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -40,15 +40,6 @@ public partial class InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rot /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -168,12 +159,12 @@ public partial class InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rot /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -189,12 +180,12 @@ public partial class InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rot /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -206,6 +197,16 @@ public partial class InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rot partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -252,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.InvokeAzAksRotateManagedCl /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -471,7 +467,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ManagedClustersRotateServiceAccountSigningKeys(SubscriptionId, ResourceGroupName, ResourceName, onNoContent, onDefault, this, Pipeline); + await this.Client.ManagedClustersRotateServiceAccountSigningKeys(SubscriptionId, ResourceGroupName, ResourceName, onNoContent, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) @@ -514,12 +510,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -536,7 +532,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -569,7 +565,31 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity.cs index 23ecec596ce7..2f27053cbbe3 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Rotates the service account signing keys of a managed cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys", ApiVersion = "2025-08-01")] public partial class InvokeAzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -40,15 +40,6 @@ public partial class InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rot /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -150,12 +141,12 @@ public partial class InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rot /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -167,6 +158,16 @@ public partial class InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rot partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -210,11 +211,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.InvokeAzAksRotateManagedCl /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -431,7 +427,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.ManagedClustersRotateServiceAccountSigningKeysViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + await this.Client.ManagedClustersRotateServiceAccountSigningKeysViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); } else { @@ -448,7 +444,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.ManagedClustersRotateServiceAccountSigningKeys(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, onNoContent, onDefault, this, Pipeline); + await this.Client.ManagedClustersRotateServiceAccountSigningKeys(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, onNoContent, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -492,12 +488,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -514,7 +510,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -547,7 +543,31 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateExpanded.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateExpanded.cs index aafce6edc53b..da686ab622f5 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateExpanded.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"create a maintenance configuration in the specified managed cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2025-08-01")] public partial class NewAzAksMaintenanceConfiguration_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -44,8 +44,8 @@ public partial class NewAzAksMaintenanceConfiguration_CreateExpanded : global::S private object _firstResponse = null; /// - /// See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned - /// maintenance. + /// Planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) + /// for more information about planned maintenance. /// private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfiguration(); @@ -55,6 +55,28 @@ public partial class NewAzAksMaintenanceConfiguration_CreateExpanded : global::S /// private int _responseSize = 0; + /// The date of the month. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The date of the month.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The date of the month.", + SerializedName = @"dayOfMonth", + PossibleTypes = new [] { typeof(int) })] + public int AbsoluteMonthlyDayOfMonth { get => _parametersBody.AbsoluteMonthlyDayOfMonth ?? default(int); set => _parametersBody.AbsoluteMonthlyDayOfMonth = value; } + + /// Specifies the number of months between each set of occurrences. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of months between each set of occurrences.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + public int AbsoluteMonthlyIntervalMonth { get => _parametersBody.AbsoluteMonthlyIntervalMonth ?? default(int); set => _parametersBody.AbsoluteMonthlyIntervalMonth = value; } + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -80,6 +102,17 @@ public partial class NewAzAksMaintenanceConfiguration_CreateExpanded : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] public string ConfigName { get => this._configName; set => this._configName = value; } + /// Specifies the number of days between each set of occurrences. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of days between each set of occurrences.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the number of days between each set of occurrences.", + SerializedName = @"intervalDays", + PossibleTypes = new [] { typeof(int) })] + public int DailyIntervalDay { get => _parametersBody.DailyIntervalDay ?? default(int); set => _parametersBody.DailyIntervalDay = value; } + /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet /// against a different subscription @@ -108,6 +141,75 @@ public partial class NewAzAksMaintenanceConfiguration_CreateExpanded : global::S /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + /// Length of maintenance window range from 4 to 24 hours. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Length of maintenance window range from 4 to 24 hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Length of maintenance window range from 4 to 24 hours.", + SerializedName = @"durationHours", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowDurationHour { get => _parametersBody.MaintenanceWindowDurationHour ?? default(int); set => _parametersBody.MaintenanceWindowDurationHour = value; } + + /// + /// Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' + /// and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 + /// 22:00' in UTC time. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time.", + SerializedName = @"notAllowedDates", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan) })] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan[] MaintenanceWindowNotAllowedDate { get => _parametersBody.MaintenanceWindowNotAllowedDate?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.MaintenanceWindowNotAllowedDate = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive + /// and will not be used for upgrades. If not specified, the maintenance window will be active right away. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away.", + SerializedName = @"startDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime MaintenanceWindowStartDate { get => _parametersBody.MaintenanceWindowStartDate ?? default(global::System.DateTime); set => _parametersBody.MaintenanceWindowStartDate = value; } + + /// + /// The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. + /// For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(string) })] + public string MaintenanceWindowStartTime { get => _parametersBody.MaintenanceWindowStartTime ?? null; set => _parametersBody.MaintenanceWindowStartTime = value; } + + /// + /// The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is + /// '+00:00'. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.", + SerializedName = @"utcOffset", + PossibleTypes = new [] { typeof(string) })] + public string MaintenanceWindowUtcOffset { get => _parametersBody.MaintenanceWindowUtcOffset ?? null; set => _parametersBody.MaintenanceWindowUtcOffset = value; } + /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -149,6 +251,41 @@ public partial class NewAzAksMaintenanceConfiguration_CreateExpanded : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies on which day of the week the maintenance occurs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + public string RelativeMonthlyDayOfWeek { get => _parametersBody.RelativeMonthlyDayOfWeek ?? null; set => _parametersBody.RelativeMonthlyDayOfWeek = value; } + + /// Specifies the number of months between each set of occurrences. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of months between each set of occurrences.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + public int RelativeMonthlyIntervalMonth { get => _parametersBody.RelativeMonthlyIntervalMonth ?? default(int); set => _parametersBody.RelativeMonthlyIntervalMonth = value; } + + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The week index. Specifies on which week of the month the dayOfWeek applies.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The week index. Specifies on which week of the month the dayOfWeek applies.", + SerializedName = @"weekIndex", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + public string RelativeMonthlyWeekIndex { get => _parametersBody.RelativeMonthlyWeekIndex ?? null; set => _parametersBody.RelativeMonthlyWeekIndex = value; } + /// Backing field for property. private string _resourceGroupName; @@ -180,12 +317,12 @@ public partial class NewAzAksMaintenanceConfiguration_CreateExpanded : global::S /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -197,30 +334,66 @@ public partial class NewAzAksMaintenanceConfiguration_CreateExpanded : global::S public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } /// - /// If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. + /// 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. /// [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.", + Description = @"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.", SerializedName = @"timeInWeek", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek) })] public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek[] TimeInWeek { get => _parametersBody.TimeInWeek?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.TimeInWeek = (value != null ? new System.Collections.Generic.List(value) : null); } + /// Specifies on which day of the week the maintenance occurs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies on which day of the week the maintenance occurs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + public string WeeklyDayOfWeek { get => _parametersBody.WeeklyDayOfWeek ?? null; set => _parametersBody.WeeklyDayOfWeek = value; } + + /// Specifies the number of weeks between each set of occurrences. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of weeks between each set of occurrences.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the number of weeks between each set of occurrences.", + SerializedName = @"intervalWeeks", + PossibleTypes = new [] { typeof(int) })] + public int WeeklyIntervalWeek { get => _parametersBody.WeeklyIntervalWeek ?? default(int); set => _parametersBody.WeeklyIntervalWeek = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -427,7 +600,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MaintenanceConfigurationsCreateOrUpdate(SubscriptionId, ResourceGroupName, ResourceName, ConfigName, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate); + await this.Client.MaintenanceConfigurationsCreateOrUpdate(SubscriptionId, ResourceGroupName, ResourceName, ConfigName, _parametersBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) @@ -466,16 +639,58 @@ protected override void StopProcessing() base.WriteObject(sendToPipeline, enumerateCollection); } + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -492,7 +707,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateViaJsonFilePath.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateViaJsonFilePath.cs index 62d3bf97b23f..96a7f6dc82b3 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateViaJsonFilePath.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"create a maintenance configuration in the specified managed cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2025-08-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.NotSuggestDefaultParameterSet] public partial class NewAzAksMaintenanceConfiguration_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, @@ -178,12 +178,12 @@ public partial class NewAzAksMaintenanceConfiguration_CreateViaJsonFilePath : gl /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -194,17 +194,29 @@ public partial class NewAzAksMaintenanceConfiguration_CreateViaJsonFilePath : gl [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -411,7 +423,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MaintenanceConfigurationsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, ResourceName, ConfigName, _jsonString, onOk, onDefault, this, Pipeline); + await this.Client.MaintenanceConfigurationsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, ResourceName, ConfigName, _jsonString, onOk, onCreated, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) @@ -450,16 +462,58 @@ protected override void StopProcessing() base.WriteObject(sendToPipeline, enumerateCollection); } + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -476,7 +530,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateViaJsonString.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateViaJsonString.cs index 6ac32412fa35..8f81ec2695f8 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateViaJsonString.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateViaJsonString.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"create a maintenance configuration in the specified managed cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2025-08-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.NotSuggestDefaultParameterSet] public partial class NewAzAksMaintenanceConfiguration_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, @@ -176,12 +176,12 @@ public partial class NewAzAksMaintenanceConfiguration_CreateViaJsonString : glob /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -192,17 +192,29 @@ public partial class NewAzAksMaintenanceConfiguration_CreateViaJsonString : glob [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -409,7 +421,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MaintenanceConfigurationsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, ResourceName, ConfigName, _jsonString, onOk, onDefault, this, Pipeline); + await this.Client.MaintenanceConfigurationsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, ResourceName, ConfigName, _jsonString, onOk, onCreated, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) @@ -448,16 +460,58 @@ protected override void StopProcessing() base.WriteObject(sendToPipeline, enumerateCollection); } + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -474,7 +528,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateExpanded.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateExpanded.cs index 85c17b051532..d990c2bcfd0d 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateExpanded.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"create a snapshot.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", ApiVersion = "2025-08-01")] public partial class NewAzAksSnapshot_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -185,12 +185,12 @@ public partial class NewAzAksSnapshot_CreateExpanded : global::System.Management /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -230,12 +230,12 @@ public partial class NewAzAksSnapshot_CreateExpanded : global::System.Management /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -527,12 +527,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -549,7 +549,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateViaJsonFilePath.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateViaJsonFilePath.cs index 7985951a75b4..e5e07d991a6a 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateViaJsonFilePath.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"create a snapshot.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", ApiVersion = "2025-08-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.NotSuggestDefaultParameterSet] public partial class NewAzAksSnapshot_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, @@ -164,12 +164,12 @@ public partial class NewAzAksSnapshot_CreateViaJsonFilePath : global::System.Man /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -197,12 +197,12 @@ public partial class NewAzAksSnapshot_CreateViaJsonFilePath : global::System.Man /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -494,12 +494,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -516,7 +516,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateViaJsonString.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateViaJsonString.cs index 313378bb9280..5903bb304fbb 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateViaJsonString.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateViaJsonString.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ISnapshot))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"create a snapshot.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", ApiVersion = "2025-08-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.NotSuggestDefaultParameterSet] public partial class NewAzAksSnapshot_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, @@ -162,12 +162,12 @@ public partial class NewAzAksSnapshot_CreateViaJsonString : global::System.Manag /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -195,12 +195,12 @@ public partial class NewAzAksSnapshot_CreateViaJsonString : global::System.Manag /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -492,12 +492,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -514,7 +514,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksTrustedAccessRoleBinding_CreateExpanded.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksTrustedAccessRoleBinding_CreateExpanded.cs new file mode 100644 index 000000000000..72165cdfd2ed --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksTrustedAccessRoleBinding_CreateExpanded.cs @@ -0,0 +1,603 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// create a trusted access role binding + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzAksTrustedAccessRoleBinding_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"create a trusted access role binding")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", ApiVersion = "2025-08-01")] + public partial class NewAzAksTrustedAccessRoleBinding_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// Defines binding between a resource and role + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding _trustedAccessRoleBindingBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBinding(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of trusted access role binding. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of trusted access role binding.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of trusted access role binding.", + SerializedName = @"trustedAccessRoleBindingName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TrustedAccessRoleBindingName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// + /// A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'.", + SerializedName = @"roles", + PossibleTypes = new [] { typeof(string) })] + public string[] Role { get => _trustedAccessRoleBindingBody.Role?.ToArray() ?? null /* fixedArrayOf */; set => _trustedAccessRoleBindingBody.Role = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// The ARM resource ID of source resource that trusted access is configured for. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ARM resource ID of source resource that trusted access is configured for.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ARM resource ID of source resource that trusted access is configured for.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + public string SourceResourceId { get => _trustedAccessRoleBindingBody.SourceResourceId ?? null; set => _trustedAccessRoleBindingBody.SourceResourceId = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzAksTrustedAccessRoleBinding_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.NewAzAksTrustedAccessRoleBinding_CreateExpanded Clone() + { + var clone = new NewAzAksTrustedAccessRoleBinding_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._trustedAccessRoleBindingBody = this._trustedAccessRoleBindingBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ResourceName = this.ResourceName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzAksTrustedAccessRoleBinding_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TrustedAccessRoleBindingsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TrustedAccessRoleBindingsCreateOrUpdate(SubscriptionId, ResourceGroupName, ResourceName, Name, _trustedAccessRoleBindingBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksTrustedAccessRoleBinding_CreateViaJsonFilePath.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksTrustedAccessRoleBinding_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..a867c84b1452 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksTrustedAccessRoleBinding_CreateViaJsonFilePath.cs @@ -0,0 +1,591 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// create a trusted access role binding + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzAksTrustedAccessRoleBinding_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"create a trusted access role binding")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", ApiVersion = "2025-08-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.NotSuggestDefaultParameterSet] + public partial class NewAzAksTrustedAccessRoleBinding_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + public global::System.String _jsonString; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of trusted access role binding. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of trusted access role binding.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of trusted access role binding.", + SerializedName = @"trustedAccessRoleBindingName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TrustedAccessRoleBindingName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzAksTrustedAccessRoleBinding_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.NewAzAksTrustedAccessRoleBinding_CreateViaJsonFilePath Clone() + { + var clone = new NewAzAksTrustedAccessRoleBinding_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ResourceName = this.ResourceName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzAksTrustedAccessRoleBinding_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TrustedAccessRoleBindingsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TrustedAccessRoleBindingsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, ResourceName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksTrustedAccessRoleBinding_CreateViaJsonString.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksTrustedAccessRoleBinding_CreateViaJsonString.cs new file mode 100644 index 000000000000..9aaef07f85ae --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/NewAzAksTrustedAccessRoleBinding_CreateViaJsonString.cs @@ -0,0 +1,589 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// create a trusted access role binding + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzAksTrustedAccessRoleBinding_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"create a trusted access role binding")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", ApiVersion = "2025-08-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.NotSuggestDefaultParameterSet] + public partial class NewAzAksTrustedAccessRoleBinding_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of trusted access role binding. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of trusted access role binding.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of trusted access role binding.", + SerializedName = @"trustedAccessRoleBindingName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TrustedAccessRoleBindingName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzAksTrustedAccessRoleBinding_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.NewAzAksTrustedAccessRoleBinding_CreateViaJsonString Clone() + { + var clone = new NewAzAksTrustedAccessRoleBinding_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ResourceName = this.ResourceName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzAksTrustedAccessRoleBinding_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TrustedAccessRoleBindingsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TrustedAccessRoleBindingsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, ResourceName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_Delete.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_Delete.cs new file mode 100644 index 000000000000..05984fbc5bc8 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_Delete.cs @@ -0,0 +1,626 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Deletes specific machines in an agent pool. + /// + /// [OpenAPI] DeleteMachines=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksAgentPoolMachine_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes specific machines in an agent pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines", ApiVersion = "2025-08-01")] + public partial class RemoveAzAksAgentPoolMachine_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// Backing field for property. + private string _agentPoolName; + + /// The name of the agent pool. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the agent pool.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the agent pool.", + SerializedName = @"agentPoolName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string AgentPoolName { get => this._agentPoolName; set => this._agentPoolName = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter _machine; + + /// Specifies a list of machine names from the agent pool to be deleted. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Specifies a list of machine names from the agent pool to be deleted.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Specifies a list of machine names from the agent pool to be deleted.", + SerializedName = @"machines", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter Machine { get => this._machine; set => this._machine = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzAksAgentPoolMachine_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.RemoveAzAksAgentPoolMachine_Delete Clone() + { + var clone = new RemoveAzAksAgentPoolMachine_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ResourceName = this.ResourceName; + clone.AgentPoolName = this.AgentPoolName; + clone.Machine = this.Machine; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AgentPoolsDeleteMachines' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AgentPoolsDeleteMachines(SubscriptionId, ResourceGroupName, ResourceName, AgentPoolName, Machine, onNoContent, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName,AgentPoolName=AgentPoolName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzAksAgentPoolMachine_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteExpanded.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteExpanded.cs new file mode 100644 index 000000000000..6f942a00c0a3 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteExpanded.cs @@ -0,0 +1,627 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Deletes specific machines in an agent pool. + /// + /// [OpenAPI] DeleteMachines=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksAgentPoolMachine_DeleteExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes specific machines in an agent pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines", ApiVersion = "2025-08-01")] + public partial class RemoveAzAksAgentPoolMachine_DeleteExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// Specifies a list of machine names from the agent pool to be deleted. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter _machinesBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolDeleteMachinesParameter(); + + /// Backing field for property. + private string _agentPoolName; + + /// The name of the agent pool. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the agent pool.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the agent pool.", + SerializedName = @"agentPoolName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string AgentPoolName { get => this._agentPoolName; set => this._agentPoolName = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// The agent pool machine names. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The agent pool machine names.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The agent pool machine names.", + SerializedName = @"machineNames", + PossibleTypes = new [] { typeof(string) })] + public string[] MachineName { get => _machinesBody.MachineName?.ToArray() ?? null /* fixedArrayOf */; set => _machinesBody.MachineName = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzAksAgentPoolMachine_DeleteExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.RemoveAzAksAgentPoolMachine_DeleteExpanded Clone() + { + var clone = new RemoveAzAksAgentPoolMachine_DeleteExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._machinesBody = this._machinesBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ResourceName = this.ResourceName; + clone.AgentPoolName = this.AgentPoolName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AgentPoolsDeleteMachines' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AgentPoolsDeleteMachines(SubscriptionId, ResourceGroupName, ResourceName, AgentPoolName, _machinesBody, onNoContent, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName,AgentPoolName=AgentPoolName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzAksAgentPoolMachine_DeleteExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaIdentity.cs new file mode 100644 index 000000000000..01dbf0dd29ac --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaIdentity.cs @@ -0,0 +1,593 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Deletes specific machines in an agent pool. + /// + /// [OpenAPI] DeleteMachines=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksAgentPoolMachine_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes specific machines in an agent pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines", ApiVersion = "2025-08-01")] + public partial class RemoveAzAksAgentPoolMachine_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter _machine; + + /// Specifies a list of machine names from the agent pool to be deleted. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Specifies a list of machine names from the agent pool to be deleted.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Specifies a list of machine names from the agent pool to be deleted.", + SerializedName = @"machines", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter Machine { get => this._machine; set => this._machine = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzAksAgentPoolMachine_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.RemoveAzAksAgentPoolMachine_DeleteViaIdentity Clone() + { + var clone = new RemoveAzAksAgentPoolMachine_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Machine = this.Machine; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AgentPoolsDeleteMachines' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AgentPoolsDeleteMachinesViaIdentity(InputObject.Id, Machine, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.AgentPoolName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AgentPoolName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AgentPoolsDeleteMachines(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.AgentPoolName ?? null, Machine, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzAksAgentPoolMachine_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaIdentityExpanded.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaIdentityExpanded.cs new file mode 100644 index 000000000000..14ae8455ed85 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaIdentityExpanded.cs @@ -0,0 +1,594 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Deletes specific machines in an agent pool. + /// + /// [OpenAPI] DeleteMachines=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksAgentPoolMachine_DeleteViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes specific machines in an agent pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines", ApiVersion = "2025-08-01")] + public partial class RemoveAzAksAgentPoolMachine_DeleteViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// Specifies a list of machine names from the agent pool to be deleted. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter _machinesBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolDeleteMachinesParameter(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// The agent pool machine names. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The agent pool machine names.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The agent pool machine names.", + SerializedName = @"machineNames", + PossibleTypes = new [] { typeof(string) })] + public string[] MachineName { get => _machinesBody.MachineName?.ToArray() ?? null /* fixedArrayOf */; set => _machinesBody.MachineName = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzAksAgentPoolMachine_DeleteViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.RemoveAzAksAgentPoolMachine_DeleteViaIdentityExpanded Clone() + { + var clone = new RemoveAzAksAgentPoolMachine_DeleteViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._machinesBody = this._machinesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AgentPoolsDeleteMachines' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AgentPoolsDeleteMachinesViaIdentity(InputObject.Id, _machinesBody, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.AgentPoolName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AgentPoolName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AgentPoolsDeleteMachines(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.AgentPoolName ?? null, _machinesBody, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzAksAgentPoolMachine_DeleteViaIdentityExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedCluster.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedCluster.cs new file mode 100644 index 000000000000..7ade06365d5d --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedCluster.cs @@ -0,0 +1,607 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Deletes specific machines in an agent pool. + /// + /// [OpenAPI] DeleteMachines=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksAgentPoolMachine_DeleteViaIdentityManagedCluster", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes specific machines in an agent pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines", ApiVersion = "2025-08-01")] + public partial class RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedCluster : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// Backing field for property. + private string _agentPoolName; + + /// The name of the agent pool. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the agent pool.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the agent pool.", + SerializedName = @"agentPoolName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string AgentPoolName { get => this._agentPoolName; set => this._agentPoolName = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter _machine; + + /// Specifies a list of machine names from the agent pool to be deleted. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Specifies a list of machine names from the agent pool to be deleted.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Specifies a list of machine names from the agent pool to be deleted.", + SerializedName = @"machines", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter Machine { get => this._machine; set => this._machine = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _managedClusterInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity ManagedClusterInputObject { get => this._managedClusterInputObject; set => this._managedClusterInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedCluster + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedCluster Clone() + { + var clone = new RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedCluster(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.AgentPoolName = this.AgentPoolName; + clone.Machine = this.Machine; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AgentPoolsDeleteMachines' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ManagedClusterInputObject?.Id != null) + { + this.ManagedClusterInputObject.Id += $"/agentPools/{(global::System.Uri.EscapeDataString(this.AgentPoolName.ToString()))}"; + await this.Client.AgentPoolsDeleteMachinesViaIdentity(ManagedClusterInputObject.Id, Machine, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ManagedClusterInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + if (null == ManagedClusterInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + if (null == ManagedClusterInputObject.ResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + await this.Client.AgentPoolsDeleteMachines(ManagedClusterInputObject.SubscriptionId ?? null, ManagedClusterInputObject.ResourceGroupName ?? null, ManagedClusterInputObject.ResourceName ?? null, AgentPoolName, Machine, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { AgentPoolName=AgentPoolName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedCluster() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedClusterExpanded.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedClusterExpanded.cs new file mode 100644 index 000000000000..3cc44b979db9 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedClusterExpanded.cs @@ -0,0 +1,609 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Deletes specific machines in an agent pool. + /// + /// [OpenAPI] DeleteMachines=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksAgentPoolMachine_DeleteViaIdentityManagedClusterExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes specific machines in an agent pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines", ApiVersion = "2025-08-01")] + public partial class RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedClusterExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// Specifies a list of machine names from the agent pool to be deleted. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolDeleteMachinesParameter _machinesBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolDeleteMachinesParameter(); + + /// Backing field for property. + private string _agentPoolName; + + /// The name of the agent pool. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the agent pool.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the agent pool.", + SerializedName = @"agentPoolName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string AgentPoolName { get => this._agentPoolName; set => this._agentPoolName = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// The agent pool machine names. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The agent pool machine names.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The agent pool machine names.", + SerializedName = @"machineNames", + PossibleTypes = new [] { typeof(string) })] + public string[] MachineName { get => _machinesBody.MachineName?.ToArray() ?? null /* fixedArrayOf */; set => _machinesBody.MachineName = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _managedClusterInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity ManagedClusterInputObject { get => this._managedClusterInputObject; set => this._managedClusterInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedClusterExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedClusterExpanded Clone() + { + var clone = new RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedClusterExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._machinesBody = this._machinesBody; + clone.AgentPoolName = this.AgentPoolName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AgentPoolsDeleteMachines' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ManagedClusterInputObject?.Id != null) + { + this.ManagedClusterInputObject.Id += $"/agentPools/{(global::System.Uri.EscapeDataString(this.AgentPoolName.ToString()))}"; + await this.Client.AgentPoolsDeleteMachinesViaIdentity(ManagedClusterInputObject.Id, _machinesBody, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ManagedClusterInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + if (null == ManagedClusterInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + if (null == ManagedClusterInputObject.ResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + await this.Client.AgentPoolsDeleteMachines(ManagedClusterInputObject.SubscriptionId ?? null, ManagedClusterInputObject.ResourceGroupName ?? null, ManagedClusterInputObject.ResourceName ?? null, AgentPoolName, _machinesBody, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { AgentPoolName=AgentPoolName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public RemoveAzAksAgentPoolMachine_DeleteViaIdentityManagedClusterExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaJsonFilePath.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaJsonFilePath.cs new file mode 100644 index 000000000000..9b836b95f199 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaJsonFilePath.cs @@ -0,0 +1,628 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Deletes specific machines in an agent pool. + /// + /// [OpenAPI] DeleteMachines=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksAgentPoolMachine_DeleteViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes specific machines in an agent pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines", ApiVersion = "2025-08-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.NotSuggestDefaultParameterSet] + public partial class RemoveAzAksAgentPoolMachine_DeleteViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + public global::System.String _jsonString; + + /// Backing field for property. + private string _agentPoolName; + + /// The name of the agent pool. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the agent pool.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the agent pool.", + SerializedName = @"agentPoolName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string AgentPoolName { get => this._agentPoolName; set => this._agentPoolName = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Delete operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Delete operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Delete operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzAksAgentPoolMachine_DeleteViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.RemoveAzAksAgentPoolMachine_DeleteViaJsonFilePath Clone() + { + var clone = new RemoveAzAksAgentPoolMachine_DeleteViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ResourceName = this.ResourceName; + clone.AgentPoolName = this.AgentPoolName; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AgentPoolsDeleteMachines' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AgentPoolsDeleteMachinesViaJsonString(SubscriptionId, ResourceGroupName, ResourceName, AgentPoolName, _jsonString, onNoContent, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName,AgentPoolName=AgentPoolName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzAksAgentPoolMachine_DeleteViaJsonFilePath() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaJsonString.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaJsonString.cs new file mode 100644 index 000000000000..a9bd8b009a8f --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksAgentPoolMachine_DeleteViaJsonString.cs @@ -0,0 +1,626 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Deletes specific machines in an agent pool. + /// + /// [OpenAPI] DeleteMachines=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksAgentPoolMachine_DeleteViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes specific machines in an agent pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines", ApiVersion = "2025-08-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.NotSuggestDefaultParameterSet] + public partial class RemoveAzAksAgentPoolMachine_DeleteViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// Backing field for property. + private string _agentPoolName; + + /// The name of the agent pool. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the agent pool.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the agent pool.", + SerializedName = @"agentPoolName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string AgentPoolName { get => this._agentPoolName; set => this._agentPoolName = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Delete operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Delete operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Delete operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzAksAgentPoolMachine_DeleteViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.RemoveAzAksAgentPoolMachine_DeleteViaJsonString Clone() + { + var clone = new RemoveAzAksAgentPoolMachine_DeleteViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ResourceName = this.ResourceName; + clone.AgentPoolName = this.AgentPoolName; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AgentPoolsDeleteMachines' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AgentPoolsDeleteMachinesViaJsonString(SubscriptionId, ResourceGroupName, ResourceName, AgentPoolName, _jsonString, onNoContent, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName,AgentPoolName=AgentPoolName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzAksAgentPoolMachine_DeleteViaJsonString() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_Delete.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_Delete.cs index 3ff1007a896b..031d0a16b8e6 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_Delete.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes a maintenance configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2025-08-01")] public partial class RemoveAzAksMaintenanceConfiguration_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -169,12 +169,12 @@ public partial class RemoveAzAksMaintenanceConfiguration_Delete : global::System /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -190,12 +190,12 @@ public partial class RemoveAzAksMaintenanceConfiguration_Delete : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -453,12 +453,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -475,7 +475,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -508,7 +508,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -532,7 +532,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_DeleteViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_DeleteViaIdentity.cs index 3847e0de0926..6d5cb5c93a15 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_DeleteViaIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes a maintenance configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2025-08-01")] public partial class RemoveAzAksMaintenanceConfiguration_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -137,12 +137,12 @@ public partial class RemoveAzAksMaintenanceConfiguration_DeleteViaIdentity : glo /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -424,12 +424,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -446,7 +446,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -479,7 +479,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -503,7 +503,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_DeleteViaIdentityManagedCluster.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_DeleteViaIdentityManagedCluster.cs index ce438c9e228e..77fff8ccd1e3 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_DeleteViaIdentityManagedCluster.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_DeleteViaIdentityManagedCluster.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes a maintenance configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", ApiVersion = "2025-08-01")] public partial class RemoveAzAksMaintenanceConfiguration_DeleteViaIdentityManagedCluster : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -151,12 +151,12 @@ public partial class RemoveAzAksMaintenanceConfiguration_DeleteViaIdentityManage /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -436,12 +436,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,7 +458,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -491,7 +491,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -515,7 +515,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_Delete.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_Delete.cs index b3fb5fbedef0..91a5b27f034f 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_Delete.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes a snapshot.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", ApiVersion = "2025-08-01")] public partial class RemoveAzAksSnapshot_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -155,12 +155,12 @@ public partial class RemoveAzAksSnapshot_Delete : global::System.Management.Auto /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -176,12 +176,12 @@ public partial class RemoveAzAksSnapshot_Delete : global::System.Management.Auto /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -439,12 +439,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -461,7 +461,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -494,7 +494,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -518,7 +518,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_DeleteViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_DeleteViaIdentity.cs index e35f2eef5826..59a09fcadaf3 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_DeleteViaIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes a snapshot.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", ApiVersion = "2025-08-01")] public partial class RemoveAzAksSnapshot_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -137,12 +137,12 @@ public partial class RemoveAzAksSnapshot_DeleteViaIdentity : global::System.Mana /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -420,12 +420,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -442,7 +442,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -475,7 +475,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -499,7 +499,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksTrustedAccessRoleBinding_Delete.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksTrustedAccessRoleBinding_Delete.cs new file mode 100644 index 000000000000..88d8baa4d8ba --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksTrustedAccessRoleBinding_Delete.cs @@ -0,0 +1,612 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Delete a trusted access role binding. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksTrustedAccessRoleBinding_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Delete a trusted access role binding.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", ApiVersion = "2025-08-01")] + public partial class RemoveAzAksTrustedAccessRoleBinding_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of trusted access role binding. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of trusted access role binding.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of trusted access role binding.", + SerializedName = @"trustedAccessRoleBindingName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TrustedAccessRoleBindingName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzAksTrustedAccessRoleBinding_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.RemoveAzAksTrustedAccessRoleBinding_Delete Clone() + { + var clone = new RemoveAzAksTrustedAccessRoleBinding_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ResourceName = this.ResourceName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TrustedAccessRoleBindingsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TrustedAccessRoleBindingsDelete(SubscriptionId, ResourceGroupName, ResourceName, Name, onNoContent, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzAksTrustedAccessRoleBinding_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentity.cs new file mode 100644 index 000000000000..d52daef2c91b --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentity.cs @@ -0,0 +1,578 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Delete a trusted access role binding. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksTrustedAccessRoleBinding_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Delete a trusted access role binding.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", ApiVersion = "2025-08-01")] + public partial class RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentity Clone() + { + var clone = new RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TrustedAccessRoleBindingsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.TrustedAccessRoleBindingsDeleteViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.TrustedAccessRoleBindingName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.TrustedAccessRoleBindingName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.TrustedAccessRoleBindingsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.TrustedAccessRoleBindingName ?? null, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentityManagedCluster.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentityManagedCluster.cs new file mode 100644 index 000000000000..cdf98f3e6715 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentityManagedCluster.cs @@ -0,0 +1,594 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// Delete a trusted access role binding. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksTrustedAccessRoleBinding_DeleteViaIdentityManagedCluster", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Delete a trusted access role binding.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", ApiVersion = "2025-08-01")] + public partial class RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentityManagedCluster : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _managedClusterInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity ManagedClusterInputObject { get => this._managedClusterInputObject; set => this._managedClusterInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of trusted access role binding. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of trusted access role binding.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of trusted access role binding.", + SerializedName = @"trustedAccessRoleBindingName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TrustedAccessRoleBindingName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentityManagedCluster + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentityManagedCluster Clone() + { + var clone = new RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentityManagedCluster(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TrustedAccessRoleBindingsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ManagedClusterInputObject?.Id != null) + { + this.ManagedClusterInputObject.Id += $"/trustedAccessRoleBindings/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TrustedAccessRoleBindingsDeleteViaIdentity(ManagedClusterInputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ManagedClusterInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + if (null == ManagedClusterInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + if (null == ManagedClusterInputObject.ResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ManagedClusterInputObject has null value for ManagedClusterInputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ManagedClusterInputObject) ); + } + await this.Client.TrustedAccessRoleBindingsDelete(ManagedClusterInputObject.SubscriptionId ?? null, ManagedClusterInputObject.ResourceGroupName ?? null, ManagedClusterInputObject.ResourceName ?? null, Name, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public RemoveAzAksTrustedAccessRoleBinding_DeleteViaIdentityManagedCluster() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_Start.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_Start.cs index 354b5cd130aa..a718174a6f12 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_Start.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_Start.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start", ApiVersion = "2025-08-01")] public partial class StartAzAksCluster_Start : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -42,15 +42,6 @@ public partial class StartAzAksCluster_Start : global::System.Management.Automat /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -171,12 +162,12 @@ public partial class StartAzAksCluster_Start : global::System.Management.Automat /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -192,12 +183,12 @@ public partial class StartAzAksCluster_Start : global::System.Management.Automat /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -209,6 +200,16 @@ public partial class StartAzAksCluster_Start : global::System.Management.Automat partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -253,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.StartAzAksCluster_Start Cl /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -463,7 +459,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ManagedClustersStart(SubscriptionId, ResourceGroupName, Name, onNoContent, onDefault, this, Pipeline); + await this.Client.ManagedClustersStart(SubscriptionId, ResourceGroupName, Name, onNoContent, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) @@ -514,12 +510,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -536,7 +532,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -569,7 +565,31 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_StartViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_StartViaIdentity.cs index 6105c15f0f0c..d5f7559a013d 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_StartViaIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_StartViaIdentity.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start", ApiVersion = "2025-08-01")] public partial class StartAzAksCluster_StartViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -42,15 +42,6 @@ public partial class StartAzAksCluster_StartViaIdentity : global::System.Managem /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -152,12 +143,12 @@ public partial class StartAzAksCluster_StartViaIdentity : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -169,6 +160,16 @@ public partial class StartAzAksCluster_StartViaIdentity : global::System.Managem partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -210,11 +211,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.StartAzAksCluster_StartVia /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -422,7 +418,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.ManagedClustersStartViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + await this.Client.ManagedClustersStartViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); } else { @@ -439,7 +435,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.ManagedClustersStart(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, onNoContent, onDefault, this, Pipeline); + await this.Client.ManagedClustersStart(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, onNoContent, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -491,12 +487,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -513,7 +509,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -546,7 +542,31 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunExpanded.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunExpanded.cs index fdccef954f74..cbf7c4e854af 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunExpanded.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunExpanded.cs @@ -21,7 +21,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"AKS will run 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).")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand", ApiVersion = "2025-08-01")] public partial class StartAzAksManagedClusterCommand_RunExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -43,18 +43,9 @@ public partial class StartAzAksManagedClusterCommand_RunExpanded : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A run command request private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandRequest _requestPayloadBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RunCommandRequest(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -200,12 +191,12 @@ public partial class StartAzAksManagedClusterCommand_RunExpanded : global::Syste /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -221,12 +212,12 @@ public partial class StartAzAksManagedClusterCommand_RunExpanded : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -285,11 +276,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.StartAzAksManagedClusterCo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -546,12 +532,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -568,7 +554,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -605,24 +591,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaIdentityExpanded.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaIdentityExpanded.cs index 92484e16e68a..dc11fad67cf7 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaIdentityExpanded.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaIdentityExpanded.cs @@ -21,7 +21,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"AKS will run 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).")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand", ApiVersion = "2025-08-01")] public partial class StartAzAksManagedClusterCommand_RunViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -43,18 +43,9 @@ public partial class StartAzAksManagedClusterCommand_RunViaIdentityExpanded : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A run command request private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandRequest _requestPayloadBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.RunCommandRequest(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -182,12 +173,12 @@ public partial class StartAzAksManagedClusterCommand_RunViaIdentityExpanded : gl /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -243,11 +234,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.StartAzAksManagedClusterCo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -524,12 +510,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -546,7 +532,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaJsonFilePath.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaJsonFilePath.cs index dc4952bdd446..ebdc9f64f162 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaJsonFilePath.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaJsonFilePath.cs @@ -21,7 +21,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"AKS will run 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).")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand", ApiVersion = "2025-08-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.NotSuggestDefaultParameterSet] public partial class StartAzAksManagedClusterCommand_RunViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, @@ -44,17 +44,8 @@ public partial class StartAzAksManagedClusterCommand_RunViaJsonFilePath : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -180,12 +171,12 @@ public partial class StartAzAksManagedClusterCommand_RunViaJsonFilePath : global /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -201,12 +192,12 @@ public partial class StartAzAksManagedClusterCommand_RunViaJsonFilePath : global /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.StartAzAksManagedClusterCo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -526,12 +512,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -548,7 +534,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -585,24 +571,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaJsonString.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaJsonString.cs index 60681d2aa709..3675da0d87e8 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaJsonString.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaJsonString.cs @@ -21,7 +21,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"AKS will run 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).")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand", ApiVersion = "2025-08-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.NotSuggestDefaultParameterSet] public partial class StartAzAksManagedClusterCommand_RunViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, @@ -44,15 +44,6 @@ public partial class StartAzAksManagedClusterCommand_RunViaJsonString : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -178,12 +169,12 @@ public partial class StartAzAksManagedClusterCommand_RunViaJsonString : global:: /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -199,12 +190,12 @@ public partial class StartAzAksManagedClusterCommand_RunViaJsonString : global:: /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.StartAzAksManagedClusterCo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -524,12 +510,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -546,7 +532,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_Stop.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_Stop.cs index cff239db7d81..e497e1fa18e2 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_Stop.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_Stop.cs @@ -23,7 +23,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", ApiVersion = "2025-08-01")] public partial class StopAzAksCluster_Stop : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -45,15 +45,6 @@ public partial class StopAzAksCluster_Stop : global::System.Management.Automatio /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -174,12 +165,12 @@ public partial class StopAzAksCluster_Stop : global::System.Management.Automatio /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -195,12 +186,12 @@ public partial class StopAzAksCluster_Stop : global::System.Management.Automatio /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -212,6 +203,16 @@ public partial class StopAzAksCluster_Stop : global::System.Management.Automatio partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -256,11 +257,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.StopAzAksCluster_Stop Clon /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -466,7 +462,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ManagedClustersStop(SubscriptionId, ResourceGroupName, Name, onNoContent, onDefault, this, Pipeline); + await this.Client.ManagedClustersStop(SubscriptionId, ResourceGroupName, Name, onNoContent, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) @@ -517,12 +513,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -539,7 +535,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -572,7 +568,31 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_StopViaIdentity.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_StopViaIdentity.cs index 1374efcae4a8..577c3dc1ca6b 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_StopViaIdentity.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_StopViaIdentity.cs @@ -23,7 +23,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", ApiVersion = "2025-08-01")] public partial class StopAzAksCluster_StopViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext @@ -45,15 +45,6 @@ public partial class StopAzAksCluster_StopViaIdentity : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -155,12 +146,12 @@ public partial class StopAzAksCluster_StopViaIdentity : global::System.Managemen /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -172,6 +163,16 @@ public partial class StopAzAksCluster_StopViaIdentity : global::System.Managemen partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -213,11 +214,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.StopAzAksCluster_StopViaId /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -425,7 +421,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.ManagedClustersStopViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + await this.Client.ManagedClustersStopViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); } else { @@ -442,7 +438,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.ManagedClustersStop(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, onNoContent, onDefault, this, Pipeline); + await this.Client.ManagedClustersStop(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, onNoContent, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -494,12 +490,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -516,7 +512,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -549,7 +545,31 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/UpdateAzAksMaintenanceConfiguration_UpdateExpanded.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/UpdateAzAksMaintenanceConfiguration_UpdateExpanded.cs index 0834844dcb08..9c34934b55cc 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/UpdateAzAksMaintenanceConfiguration_UpdateExpanded.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/UpdateAzAksMaintenanceConfiguration_UpdateExpanded.cs @@ -44,8 +44,8 @@ public partial class UpdateAzAksMaintenanceConfiguration_UpdateExpanded : global private object _firstResponse = null; /// - /// See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned - /// maintenance. + /// Planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) + /// for more information about planned maintenance. /// private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfiguration(); @@ -55,6 +55,28 @@ public partial class UpdateAzAksMaintenanceConfiguration_UpdateExpanded : global /// private int _responseSize = 0; + /// The date of the month. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The date of the month.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The date of the month.", + SerializedName = @"dayOfMonth", + PossibleTypes = new [] { typeof(int) })] + public int AbsoluteMonthlyDayOfMonth { get => _parametersBody.AbsoluteMonthlyDayOfMonth ?? default(int); set => _parametersBody.AbsoluteMonthlyDayOfMonth = value; } + + /// Specifies the number of months between each set of occurrences. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of months between each set of occurrences.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + public int AbsoluteMonthlyIntervalMonth { get => _parametersBody.AbsoluteMonthlyIntervalMonth ?? default(int); set => _parametersBody.AbsoluteMonthlyIntervalMonth = value; } + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -80,6 +102,17 @@ public partial class UpdateAzAksMaintenanceConfiguration_UpdateExpanded : global [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] public string ConfigName { get => this._configName; set => this._configName = value; } + /// Specifies the number of days between each set of occurrences. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of days between each set of occurrences.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the number of days between each set of occurrences.", + SerializedName = @"intervalDays", + PossibleTypes = new [] { typeof(int) })] + public int DailyIntervalDay { get => _parametersBody.DailyIntervalDay ?? default(int); set => _parametersBody.DailyIntervalDay = value; } + /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet /// against a different subscription @@ -108,6 +141,75 @@ public partial class UpdateAzAksMaintenanceConfiguration_UpdateExpanded : global /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + /// Length of maintenance window range from 4 to 24 hours. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Length of maintenance window range from 4 to 24 hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Length of maintenance window range from 4 to 24 hours.", + SerializedName = @"durationHours", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowDurationHour { get => _parametersBody.MaintenanceWindowDurationHour ?? default(int); set => _parametersBody.MaintenanceWindowDurationHour = value; } + + /// + /// Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' + /// and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 + /// 22:00' in UTC time. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time.", + SerializedName = @"notAllowedDates", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan) })] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan[] MaintenanceWindowNotAllowedDate { get => _parametersBody.MaintenanceWindowNotAllowedDate?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.MaintenanceWindowNotAllowedDate = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive + /// and will not be used for upgrades. If not specified, the maintenance window will be active right away. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away.", + SerializedName = @"startDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime MaintenanceWindowStartDate { get => _parametersBody.MaintenanceWindowStartDate ?? default(global::System.DateTime); set => _parametersBody.MaintenanceWindowStartDate = value; } + + /// + /// The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. + /// For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(string) })] + public string MaintenanceWindowStartTime { get => _parametersBody.MaintenanceWindowStartTime ?? null; set => _parametersBody.MaintenanceWindowStartTime = value; } + + /// + /// The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is + /// '+00:00'. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.", + SerializedName = @"utcOffset", + PossibleTypes = new [] { typeof(string) })] + public string MaintenanceWindowUtcOffset { get => _parametersBody.MaintenanceWindowUtcOffset ?? null; set => _parametersBody.MaintenanceWindowUtcOffset = value; } + /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -149,6 +251,41 @@ public partial class UpdateAzAksMaintenanceConfiguration_UpdateExpanded : global [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies on which day of the week the maintenance occurs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + public string RelativeMonthlyDayOfWeek { get => _parametersBody.RelativeMonthlyDayOfWeek ?? null; set => _parametersBody.RelativeMonthlyDayOfWeek = value; } + + /// Specifies the number of months between each set of occurrences. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of months between each set of occurrences.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + public int RelativeMonthlyIntervalMonth { get => _parametersBody.RelativeMonthlyIntervalMonth ?? default(int); set => _parametersBody.RelativeMonthlyIntervalMonth = value; } + + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The week index. Specifies on which week of the month the dayOfWeek applies.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The week index. Specifies on which week of the month the dayOfWeek applies.", + SerializedName = @"weekIndex", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + public string RelativeMonthlyWeekIndex { get => _parametersBody.RelativeMonthlyWeekIndex ?? null; set => _parametersBody.RelativeMonthlyWeekIndex = value; } + /// Backing field for property. private string _resourceGroupName; @@ -180,12 +317,12 @@ public partial class UpdateAzAksMaintenanceConfiguration_UpdateExpanded : global /// Backing field for property. private string _subscriptionId; - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The ID of the target subscription.", + Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -197,30 +334,66 @@ public partial class UpdateAzAksMaintenanceConfiguration_UpdateExpanded : global public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } /// - /// If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. + /// 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. /// [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.", + Description = @"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.", SerializedName = @"timeInWeek", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek) })] public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek[] TimeInWeek { get => _parametersBody.TimeInWeek?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.TimeInWeek = (value != null ? new System.Collections.Generic.List(value) : null); } + /// Specifies on which day of the week the maintenance occurs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies on which day of the week the maintenance occurs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + public string WeeklyDayOfWeek { get => _parametersBody.WeeklyDayOfWeek ?? null; set => _parametersBody.WeeklyDayOfWeek = value; } + + /// Specifies the number of weeks between each set of occurrences. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of weeks between each set of occurrences.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the number of weeks between each set of occurrences.", + SerializedName = @"intervalWeeks", + PossibleTypes = new [] { typeof(int) })] + public int WeeklyIntervalWeek { get => _parametersBody.WeeklyIntervalWeek ?? default(int); set => _parametersBody.WeeklyIntervalWeek = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -421,7 +594,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } _parametersBody = await this.Client.MaintenanceConfigurationsGetWithResult(SubscriptionId, ResourceGroupName, ResourceName, ConfigName, this, Pipeline); this.Update_parametersBody(); - await this.Client.MaintenanceConfigurationsCreateOrUpdate(SubscriptionId, ResourceGroupName, ResourceName, ConfigName, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate); + await this.Client.MaintenanceConfigurationsCreateOrUpdate(SubscriptionId, ResourceGroupName, ResourceName, ConfigName, _parametersBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) @@ -463,6 +636,58 @@ private void Update_parametersBody() { this.NotAllowedTime = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpan[])(this.MyInvocation?.BoundParameters["NotAllowedTime"]); } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("MaintenanceWindowDurationHour"))) + { + this.MaintenanceWindowDurationHour = (int)(this.MyInvocation?.BoundParameters["MaintenanceWindowDurationHour"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("MaintenanceWindowUtcOffset"))) + { + this.MaintenanceWindowUtcOffset = (string)(this.MyInvocation?.BoundParameters["MaintenanceWindowUtcOffset"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("MaintenanceWindowStartDate"))) + { + this.MaintenanceWindowStartDate = (global::System.DateTime)(this.MyInvocation?.BoundParameters["MaintenanceWindowStartDate"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("MaintenanceWindowStartTime"))) + { + this.MaintenanceWindowStartTime = (string)(this.MyInvocation?.BoundParameters["MaintenanceWindowStartTime"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("MaintenanceWindowNotAllowedDate"))) + { + this.MaintenanceWindowNotAllowedDate = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan[])(this.MyInvocation?.BoundParameters["MaintenanceWindowNotAllowedDate"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("DailyIntervalDay"))) + { + this.DailyIntervalDay = (int)(this.MyInvocation?.BoundParameters["DailyIntervalDay"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("WeeklyIntervalWeek"))) + { + this.WeeklyIntervalWeek = (int)(this.MyInvocation?.BoundParameters["WeeklyIntervalWeek"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("WeeklyDayOfWeek"))) + { + this.WeeklyDayOfWeek = (string)(this.MyInvocation?.BoundParameters["WeeklyDayOfWeek"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("AbsoluteMonthlyIntervalMonth"))) + { + this.AbsoluteMonthlyIntervalMonth = (int)(this.MyInvocation?.BoundParameters["AbsoluteMonthlyIntervalMonth"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("AbsoluteMonthlyDayOfMonth"))) + { + this.AbsoluteMonthlyDayOfMonth = (int)(this.MyInvocation?.BoundParameters["AbsoluteMonthlyDayOfMonth"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("RelativeMonthlyIntervalMonth"))) + { + this.RelativeMonthlyIntervalMonth = (int)(this.MyInvocation?.BoundParameters["RelativeMonthlyIntervalMonth"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("RelativeMonthlyWeekIndex"))) + { + this.RelativeMonthlyWeekIndex = (string)(this.MyInvocation?.BoundParameters["RelativeMonthlyWeekIndex"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("RelativeMonthlyDayOfWeek"))) + { + this.RelativeMonthlyDayOfWeek = (string)(this.MyInvocation?.BoundParameters["RelativeMonthlyDayOfWeek"]); + } } /// @@ -480,16 +705,58 @@ private void Update_parametersBody() base.WriteObject(sendToPipeline, enumerateCollection); } + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -506,7 +773,7 @@ private void Update_parametersBody() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/UpdateAzAksMaintenanceConfiguration_UpdateViaIdentityExpanded.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/UpdateAzAksMaintenanceConfiguration_UpdateViaIdentityExpanded.cs index f3137e786c06..813f3312db30 100644 --- a/generated/Aks/Aks.Autorest/generated/cmdlets/UpdateAzAksMaintenanceConfiguration_UpdateViaIdentityExpanded.cs +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/UpdateAzAksMaintenanceConfiguration_UpdateViaIdentityExpanded.cs @@ -44,8 +44,8 @@ public partial class UpdateAzAksMaintenanceConfiguration_UpdateViaIdentityExpand private object _firstResponse = null; /// - /// See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned - /// maintenance. + /// Planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) + /// for more information about planned maintenance. /// private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.MaintenanceConfiguration(); @@ -55,6 +55,28 @@ public partial class UpdateAzAksMaintenanceConfiguration_UpdateViaIdentityExpand /// private int _responseSize = 0; + /// The date of the month. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The date of the month.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The date of the month.", + SerializedName = @"dayOfMonth", + PossibleTypes = new [] { typeof(int) })] + public int AbsoluteMonthlyDayOfMonth { get => _parametersBody.AbsoluteMonthlyDayOfMonth ?? default(int); set => _parametersBody.AbsoluteMonthlyDayOfMonth = value; } + + /// Specifies the number of months between each set of occurrences. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of months between each set of occurrences.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + public int AbsoluteMonthlyIntervalMonth { get => _parametersBody.AbsoluteMonthlyIntervalMonth ?? default(int); set => _parametersBody.AbsoluteMonthlyIntervalMonth = value; } + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] @@ -66,6 +88,17 @@ public partial class UpdateAzAksMaintenanceConfiguration_UpdateViaIdentityExpand /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + /// Specifies the number of days between each set of occurrences. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of days between each set of occurrences.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the number of days between each set of occurrences.", + SerializedName = @"intervalDays", + PossibleTypes = new [] { typeof(int) })] + public int DailyIntervalDay { get => _parametersBody.DailyIntervalDay ?? default(int); set => _parametersBody.DailyIntervalDay = value; } + /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet /// against a different subscription @@ -102,6 +135,75 @@ public partial class UpdateAzAksMaintenanceConfiguration_UpdateViaIdentityExpand /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + /// Length of maintenance window range from 4 to 24 hours. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Length of maintenance window range from 4 to 24 hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Length of maintenance window range from 4 to 24 hours.", + SerializedName = @"durationHours", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowDurationHour { get => _parametersBody.MaintenanceWindowDurationHour ?? default(int); set => _parametersBody.MaintenanceWindowDurationHour = value; } + + /// + /// Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' + /// and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 + /// 22:00' in UTC time. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time.", + SerializedName = @"notAllowedDates", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan) })] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan[] MaintenanceWindowNotAllowedDate { get => _parametersBody.MaintenanceWindowNotAllowedDate?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.MaintenanceWindowNotAllowedDate = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive + /// and will not be used for upgrades. If not specified, the maintenance window will be active right away. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away.", + SerializedName = @"startDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime MaintenanceWindowStartDate { get => _parametersBody.MaintenanceWindowStartDate ?? default(global::System.DateTime); set => _parametersBody.MaintenanceWindowStartDate = value; } + + /// + /// The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. + /// For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(string) })] + public string MaintenanceWindowStartTime { get => _parametersBody.MaintenanceWindowStartTime ?? null; set => _parametersBody.MaintenanceWindowStartTime = value; } + + /// + /// The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is + /// '+00:00'. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.", + SerializedName = @"utcOffset", + PossibleTypes = new [] { typeof(string) })] + public string MaintenanceWindowUtcOffset { get => _parametersBody.MaintenanceWindowUtcOffset ?? null; set => _parametersBody.MaintenanceWindowUtcOffset = value; } + /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -143,31 +245,102 @@ public partial class UpdateAzAksMaintenanceConfiguration_UpdateViaIdentityExpand [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// Specifies on which day of the week the maintenance occurs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies on which day of the week the maintenance occurs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + public string RelativeMonthlyDayOfWeek { get => _parametersBody.RelativeMonthlyDayOfWeek ?? null; set => _parametersBody.RelativeMonthlyDayOfWeek = value; } + + /// Specifies the number of months between each set of occurrences. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of months between each set of occurrences.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the number of months between each set of occurrences.", + SerializedName = @"intervalMonths", + PossibleTypes = new [] { typeof(int) })] + public int RelativeMonthlyIntervalMonth { get => _parametersBody.RelativeMonthlyIntervalMonth ?? default(int); set => _parametersBody.RelativeMonthlyIntervalMonth = value; } + + /// The week index. Specifies on which week of the month the dayOfWeek applies. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The week index. Specifies on which week of the month the dayOfWeek applies.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The week index. Specifies on which week of the month the dayOfWeek applies.", + SerializedName = @"weekIndex", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("First", "Second", "Third", "Fourth", "Last")] + public string RelativeMonthlyWeekIndex { get => _parametersBody.RelativeMonthlyWeekIndex ?? null; set => _parametersBody.RelativeMonthlyWeekIndex = value; } + /// - /// If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. + /// 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. /// [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.", + Description = @"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.", SerializedName = @"timeInWeek", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek) })] public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek[] TimeInWeek { get => _parametersBody.TimeInWeek?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.TimeInWeek = (value != null ? new System.Collections.Generic.List(value) : null); } + /// Specifies on which day of the week the maintenance occurs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies on which day of the week the maintenance occurs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies on which day of the week the maintenance occurs.", + SerializedName = @"dayOfWeek", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")] + public string WeeklyDayOfWeek { get => _parametersBody.WeeklyDayOfWeek ?? null; set => _parametersBody.WeeklyDayOfWeek = value; } + + /// Specifies the number of weeks between each set of occurrences. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of weeks between each set of occurrences.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the number of weeks between each set of occurrences.", + SerializedName = @"intervalWeeks", + PossibleTypes = new [] { typeof(int) })] + public int WeeklyIntervalWeek { get => _parametersBody.WeeklyIntervalWeek ?? default(int); set => _parametersBody.WeeklyIntervalWeek = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -370,7 +543,7 @@ protected override void ProcessRecord() { _parametersBody = await this.Client.MaintenanceConfigurationsGetViaIdentityWithResult(InputObject.Id, this, Pipeline); this.Update_parametersBody(); - await this.Client.MaintenanceConfigurationsCreateOrUpdateViaIdentity(InputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate); + await this.Client.MaintenanceConfigurationsCreateOrUpdateViaIdentity(InputObject.Id, _parametersBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate); } else { @@ -393,7 +566,7 @@ protected override void ProcessRecord() } _parametersBody = await this.Client.MaintenanceConfigurationsGetWithResult(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.ConfigName ?? null, this, Pipeline); this.Update_parametersBody(); - await this.Client.MaintenanceConfigurationsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.ConfigName ?? null, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate); + await this.Client.MaintenanceConfigurationsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.ConfigName ?? null, _parametersBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -437,6 +610,58 @@ private void Update_parametersBody() { this.NotAllowedTime = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpan[])(this.MyInvocation?.BoundParameters["NotAllowedTime"]); } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("MaintenanceWindowDurationHour"))) + { + this.MaintenanceWindowDurationHour = (int)(this.MyInvocation?.BoundParameters["MaintenanceWindowDurationHour"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("MaintenanceWindowUtcOffset"))) + { + this.MaintenanceWindowUtcOffset = (string)(this.MyInvocation?.BoundParameters["MaintenanceWindowUtcOffset"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("MaintenanceWindowStartDate"))) + { + this.MaintenanceWindowStartDate = (global::System.DateTime)(this.MyInvocation?.BoundParameters["MaintenanceWindowStartDate"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("MaintenanceWindowStartTime"))) + { + this.MaintenanceWindowStartTime = (string)(this.MyInvocation?.BoundParameters["MaintenanceWindowStartTime"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("MaintenanceWindowNotAllowedDate"))) + { + this.MaintenanceWindowNotAllowedDate = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IDateSpan[])(this.MyInvocation?.BoundParameters["MaintenanceWindowNotAllowedDate"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("DailyIntervalDay"))) + { + this.DailyIntervalDay = (int)(this.MyInvocation?.BoundParameters["DailyIntervalDay"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("WeeklyIntervalWeek"))) + { + this.WeeklyIntervalWeek = (int)(this.MyInvocation?.BoundParameters["WeeklyIntervalWeek"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("WeeklyDayOfWeek"))) + { + this.WeeklyDayOfWeek = (string)(this.MyInvocation?.BoundParameters["WeeklyDayOfWeek"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("AbsoluteMonthlyIntervalMonth"))) + { + this.AbsoluteMonthlyIntervalMonth = (int)(this.MyInvocation?.BoundParameters["AbsoluteMonthlyIntervalMonth"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("AbsoluteMonthlyDayOfMonth"))) + { + this.AbsoluteMonthlyDayOfMonth = (int)(this.MyInvocation?.BoundParameters["AbsoluteMonthlyDayOfMonth"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("RelativeMonthlyIntervalMonth"))) + { + this.RelativeMonthlyIntervalMonth = (int)(this.MyInvocation?.BoundParameters["RelativeMonthlyIntervalMonth"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("RelativeMonthlyWeekIndex"))) + { + this.RelativeMonthlyWeekIndex = (string)(this.MyInvocation?.BoundParameters["RelativeMonthlyWeekIndex"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("RelativeMonthlyDayOfWeek"))) + { + this.RelativeMonthlyDayOfWeek = (string)(this.MyInvocation?.BoundParameters["RelativeMonthlyDayOfWeek"]); + } } /// @@ -454,16 +679,58 @@ private void Update_parametersBody() base.WriteObject(sendToPipeline, enumerateCollection); } + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -480,7 +747,7 @@ private void Update_parametersBody() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/UpdateAzAksTrustedAccessRoleBinding_UpdateExpanded.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/UpdateAzAksTrustedAccessRoleBinding_UpdateExpanded.cs new file mode 100644 index 000000000000..b063a3d2a684 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/UpdateAzAksTrustedAccessRoleBinding_UpdateExpanded.cs @@ -0,0 +1,617 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// update a trusted access role binding + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzAksTrustedAccessRoleBinding_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"update a trusted access role binding")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class UpdateAzAksTrustedAccessRoleBinding_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// Defines binding between a resource and role + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding _trustedAccessRoleBindingBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBinding(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of trusted access role binding. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of trusted access role binding.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of trusted access role binding.", + SerializedName = @"trustedAccessRoleBindingName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TrustedAccessRoleBindingName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceName; + + /// The name of the managed cluster resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the managed cluster resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the managed cluster resource.", + SerializedName = @"resourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// + /// A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'.", + SerializedName = @"roles", + PossibleTypes = new [] { typeof(string) })] + public string[] Role { get => _trustedAccessRoleBindingBody.Role?.ToArray() ?? null /* fixedArrayOf */; set => _trustedAccessRoleBindingBody.Role = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// The ARM resource ID of source resource that trusted access is configured for. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ARM resource ID of source resource that trusted access is configured for.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ARM resource ID of source resource that trusted access is configured for.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + public string SourceResourceId { get => _trustedAccessRoleBindingBody.SourceResourceId ?? null; set => _trustedAccessRoleBindingBody.SourceResourceId = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzAksTrustedAccessRoleBinding_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.UpdateAzAksTrustedAccessRoleBinding_UpdateExpanded Clone() + { + var clone = new UpdateAzAksTrustedAccessRoleBinding_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._trustedAccessRoleBindingBody = this._trustedAccessRoleBindingBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ResourceName = this.ResourceName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TrustedAccessRoleBindingsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + _trustedAccessRoleBindingBody = await this.Client.TrustedAccessRoleBindingsGetWithResult(SubscriptionId, ResourceGroupName, ResourceName, Name, this, Pipeline); + this.Update_trustedAccessRoleBindingBody(); + await this.Client.TrustedAccessRoleBindingsCreateOrUpdate(SubscriptionId, ResourceGroupName, ResourceName, Name, _trustedAccessRoleBindingBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzAksTrustedAccessRoleBinding_UpdateExpanded() + { + + } + + private void Update_trustedAccessRoleBindingBody() + { + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("SourceResourceId"))) + { + this.SourceResourceId = (string)(this.MyInvocation?.BoundParameters["SourceResourceId"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("Role"))) + { + this.Role = (string[])(this.MyInvocation?.BoundParameters["Role"]); + } + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/cmdlets/UpdateAzAksTrustedAccessRoleBinding_UpdateViaIdentityExpanded.cs b/generated/Aks/Aks.Autorest/generated/cmdlets/UpdateAzAksTrustedAccessRoleBinding_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..0faa8179b124 --- /dev/null +++ b/generated/Aks/Aks.Autorest/generated/cmdlets/UpdateAzAksTrustedAccessRoleBinding_UpdateViaIdentityExpanded.cs @@ -0,0 +1,588 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Cmdlets; + using System; + + /// update a trusted access role binding + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzAksTrustedAccessRoleBinding_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"update a trusted access role binding")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class UpdateAzAksTrustedAccessRoleBinding_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// Defines binding between a resource and role + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding _trustedAccessRoleBindingBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TrustedAccessRoleBinding(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'.", + SerializedName = @"roles", + PossibleTypes = new [] { typeof(string) })] + public string[] Role { get => _trustedAccessRoleBindingBody.Role?.ToArray() ?? null /* fixedArrayOf */; set => _trustedAccessRoleBindingBody.Role = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// The ARM resource ID of source resource that trusted access is configured for. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ARM resource ID of source resource that trusted access is configured for.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ARM resource ID of source resource that trusted access is configured for.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + public string SourceResourceId { get => _trustedAccessRoleBindingBody.SourceResourceId ?? null; set => _trustedAccessRoleBindingBody.SourceResourceId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzAksTrustedAccessRoleBinding_UpdateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.UpdateAzAksTrustedAccessRoleBinding_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzAksTrustedAccessRoleBinding_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._trustedAccessRoleBindingBody = this._trustedAccessRoleBindingBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TrustedAccessRoleBindingsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + _trustedAccessRoleBindingBody = await this.Client.TrustedAccessRoleBindingsGetViaIdentityWithResult(InputObject.Id, this, Pipeline); + this.Update_trustedAccessRoleBindingBody(); + await this.Client.TrustedAccessRoleBindingsCreateOrUpdateViaIdentity(InputObject.Id, _trustedAccessRoleBindingBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.TrustedAccessRoleBindingName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.TrustedAccessRoleBindingName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + _trustedAccessRoleBindingBody = await this.Client.TrustedAccessRoleBindingsGetWithResult(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.TrustedAccessRoleBindingName ?? null, this, Pipeline); + this.Update_trustedAccessRoleBindingBody(); + await this.Client.TrustedAccessRoleBindingsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.TrustedAccessRoleBindingName ?? null, _trustedAccessRoleBindingBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public UpdateAzAksTrustedAccessRoleBinding_UpdateViaIdentityExpanded() + { + + } + + private void Update_trustedAccessRoleBindingBody() + { + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("SourceResourceId"))) + { + this.SourceResourceId = (string)(this.MyInvocation?.BoundParameters["SourceResourceId"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("Role"))) + { + this.Role = (string[])(this.MyInvocation?.BoundParameters["Role"]); + } + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITrustedAccessRoleBinding + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/Aks/Aks.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs b/generated/Aks/Aks.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs index 3a3933e0985b..6ceaab48df02 100644 --- a/generated/Aks/Aks.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs +++ b/generated/Aks/Aks.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs @@ -36,14 +36,23 @@ internal class PsHelpInfo public object Role { get; } public string NonTerminatingErrors { get; } + public static string CapitalizeFirstLetter(string text) + { + if (string.IsNullOrEmpty(text)) + return text; + + return char.ToUpper(text[0]) + text.Substring(1); + } + public PsHelpInfo(PSObject helpObject = null) { helpObject = helpObject ?? new PSObject(); CmdletName = helpObject.GetProperty("Name").NullIfEmpty() ?? helpObject.GetNestedProperty("details", "name"); ModuleName = helpObject.GetProperty("ModuleName"); - Synopsis = helpObject.GetProperty("Synopsis"); + Synopsis = CapitalizeFirstLetter(helpObject.GetProperty("Synopsis")); Description = helpObject.GetProperty("description").EmptyIfNull().ToDescriptionText().NullIfEmpty() ?? helpObject.GetNestedProperty("details", "description").EmptyIfNull().ToDescriptionText(); + Description = CapitalizeFirstLetter(Description); AlertText = helpObject.GetNestedProperty("alertSet", "alert").EmptyIfNull().ToDescriptionText(); Category = helpObject.GetProperty("Category"); HasCommonParameters = helpObject.GetProperty("CommonParameters").ToNullableBool(); diff --git a/generated/Aks/Aks.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/generated/Aks/Aks.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs index fac55ad55d1d..8912b4395a0e 100644 --- a/generated/Aks/Aks.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/generated/Aks/Aks.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -392,6 +392,7 @@ public CommentInfo(VariantGroup variantGroup) var helpInfo = variantGroup.HelpInfo; Description = variantGroup.Variants.SelectMany(v => v.Attributes).OfType().FirstOrDefault()?.Description.NullIfEmpty() ?? helpInfo.Description.EmptyIfNull(); + Description = PsHelpInfo.CapitalizeFirstLetter(Description); // If there is no Synopsis, PowerShell may put in the Syntax string as the Synopsis. This seems unintended, so we remove the Synopsis in this situation. var synopsis = helpInfo.Synopsis.EmptyIfNull().Trim().StartsWith(variantGroup.CmdletName) ? String.Empty : helpInfo.Synopsis; Synopsis = synopsis.NullIfEmpty() ?? Description; diff --git a/generated/Aks/Aks.Autorest/generated/runtime/Context.cs b/generated/Aks/Aks.Autorest/generated/runtime/Context.cs index ac8ed859671a..bb00a06f9ec0 100644 --- a/generated/Aks/Aks.Autorest/generated/runtime/Context.cs +++ b/generated/Aks/Aks.Autorest/generated/runtime/Context.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime /// The IContext Interface defines the communication mechanism for input customization. /// /// - /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// In the context, we will have client, pipeline, PSBoundParameters, default EventListener, Cancellation. /// public interface IContext { diff --git a/generated/Aks/Aks.Autorest/generated/runtime/MessageAttribute.cs b/generated/Aks/Aks.Autorest/generated/runtime/MessageAttribute.cs index f10432970462..a65864cc6692 100644 --- a/generated/Aks/Aks.Autorest/generated/runtime/MessageAttribute.cs +++ b/generated/Aks/Aks.Autorest/generated/runtime/MessageAttribute.cs @@ -16,9 +16,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime public class GenericBreakingChangeAttribute : Attribute { private string _message; - //A dexcription of what the change is about, non mandatory + //A description of what the change is about, non mandatory public string ChangeDescription { get; set; } = null; + //Name of the module that is being deprecated + public string moduleName { get; set; } = String.IsNullOrEmpty(@"") ? @"Az.Aks" : @""; + //The version the change is effective from, non mandatory public string DeprecateByVersion { get; } public string DeprecateByAzVersion { get; } @@ -82,7 +85,7 @@ public void PrintCustomAttributeInfo(Action writeOutput) } writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion)); - writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.moduleName, this.DeprecateByVersion)); if (OldWay != null && NewWay != null) { @@ -191,11 +194,11 @@ public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this( this.IsEstimatedGaDateSet = true; } } - + public void PrintCustomAttributeInfo(Action writeOutput) { writeOutput(this._message); - + if (IsEstimatedGaDateSet) { writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString())); diff --git a/generated/Aks/Aks.Autorest/generated/runtime/Properties/Resources.resx b/generated/Aks/Aks.Autorest/generated/runtime/Properties/Resources.resx index a08a2e50172b..4ef90b70573d 100644 --- a/generated/Aks/Aks.Autorest/generated/runtime/Properties/Resources.resx +++ b/generated/Aks/Aks.Autorest/generated/runtime/Properties/Resources.resx @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can -- The change is expected to take effect from version : '{0}' +- The change is expected to take effect in '{0}' from version : '{1}' ```powershell diff --git a/generated/Aks/Aks.Autorest/internal/Get-AzAksContainerServiceOrchestrator.ps1 b/generated/Aks/Aks.Autorest/internal/Get-AzAksContainerServiceOrchestrator.ps1 index f01cde4dfe4b..c2602a568578 100644 --- a/generated/Aks/Aks.Autorest/internal/Get-AzAksContainerServiceOrchestrator.ps1 +++ b/generated/Aks/Aks.Autorest/internal/Get-AzAksContainerServiceOrchestrator.ps1 @@ -46,6 +46,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter()] diff --git a/generated/Aks/Aks.Autorest/internal/ProxyCmdletDefinitions.ps1 b/generated/Aks/Aks.Autorest/internal/ProxyCmdletDefinitions.ps1 index a4d2180a122a..5c512fb95510 100644 --- a/generated/Aks/Aks.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/generated/Aks/Aks.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -46,6 +46,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, [Parameter()]